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

 ##########
 File path: tools/cli/go-whisk/whisk/api.go
 ##########
 @@ -196,12 +221,87 @@ var ApiVerbs map[string]bool = map[string]bool {
 const (
     Overwrite = true
     DoNotOverwrite = false
+    sortActionFlag = "a"
 )
 
 ////////////////////
 // Api Methods //
 ////////////////////
 
+// Compare(sortable) compares api to sortable for the purpose of sorting.
+// params: sortable that is also of type ApiFilteredList (REQUIRED).
+// ***Method of type Sortable***
+// ***By default, sorts Alphabetically***
+func(api ApiFilteredList) Compare(sortable Sortable) bool{
+  // convert sortable back to proper type
+  apiToCompare := sortable.(ApiFilteredList)
+  var apiString string
+  var compareString string
+
+  // Check for flag to build proper comparison strings
+  switch api.Flag {
 
 Review comment:
   Instead of using a global variable, I'm thinking this is better passed as an 
argument to the Compare function or as a property of ApiFilteredList
 
----------------------------------------------------------------
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