dubeejw commented on a change in pull request #2326: (Review) Alphabetize
URL: 
https://github.com/apache/incubator-openwhisk/pull/2326#discussion_r125915179
 
 

 ##########
 File path: tools/cli/go-whisk-cli/commands/api.go
 ##########
 @@ -494,21 +505,21 @@ func printFilteredListRow(resultApi *whisk.RetApi, api 
*whisk.ApiOptions, maxAct
                     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(fmtString,
-                            actionName[0 : min(len(actionName), 
maxActionNameSize)],
-                            op,
-                            apiName[0 : min(len(apiName), maxApiNameSize)],
-                            baseUrl+path)
+                        sortInfo = AssignRowInfo(actionName[0 : 
min(len(actionName), maxActionNameSize)], op, apiName[0 : min(len(apiName), 
maxApiNameSize)], basePath, path, baseUrl+path, sortAlg)
+                        sortInfo.FmtString = fmtString
+                        whisk.Debug(whisk.DbgInfo, "Appening to sortInfoArr: 
%s\n", sortInfo.RelPath)
+                        sortInfoArr = append(sortInfoArr, sortInfo)
                     }
                 }
             }
         }
     }
+    return sortInfoArr
 }
 
 func getLargestActionNameSize(retApiArray *whisk.RetApiArray, api 
*whisk.ApiOptions) int {
     var maxNameSize = 0
-    for i:=0; i<len(retApiArray.Apis); i++ {
+    for i := 0; i<len(retApiArray.Apis); i++ {
 
 Review comment:
   Spaces needed `i < len`.
 
----------------------------------------------------------------
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

Reply via email to