dubeejw commented on a change in pull request #2326: (Review) Alphabetize
URL:
https://github.com/apache/incubator-openwhisk/pull/2326#discussion_r124099507
##########
File path: tools/cli/go-whisk-cli/commands/api.go
##########
@@ -460,29 +471,37 @@ func printFilteredListApi(resultApi *whisk.RetApi, api
*whisk.ApiOptions) {
if ( len(api.ApiVerb) == 0 || strings.ToLower(op) ==
strings.ToLower(api.ApiVerb)) {
whisk.Debug(whisk.DbgInfo, "apiGetCmd: operation
matches: %#v\n", opv)
var actionName =
"/"+opv.XOpenWhisk.Namespace+"/"+opv.XOpenWhisk.ActionName
- fmt.Printf("%s: %s\n", wski18n.T("Action"), actionName)
- fmt.Printf(" %s: %s\n", wski18n.T("API Name"),
apiName)
- fmt.Printf(" %s: %s\n", wski18n.T("Base path"),
basePath)
- fmt.Printf(" %s: %s\n", wski18n.T("Path"), path)
- fmt.Printf(" %s: %s\n", wski18n.T("Verb"), op)
- fmt.Printf(" %s: %s\n", wski18n.T("URL"),
baseUrl+path)
+ sortInfo.ActionName = actionName
Review comment:
Looks like populating `sortInfo` occurs multiple times throughout the code.
Add a function that takes needed arguments and returns a populated sortInfo.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services