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

 ##########
 File path: tools/cli/go-whisk/whisk/api.go
 ##########
 @@ -202,6 +226,90 @@ const (
 // Api Methods //
 ////////////////////
 
+/*
+ *  Compare(s) compares ApiFilteredList api to Sortable s for the purpose of
+ *    sorting.
+ *  params: Sortable type s that is also of type ApiFilteredList (REQUIRED)
+ *  ***Method of type Sortable***
+ *  ***By default, sorts Alphabetically***
+ */
+func(api ApiFilteredList) Compare(sortable Sortable) bool{
+  // convert s back to proper type
+  apiToCompare := sortable.(ApiFilteredList)
+  var apiString string
+  var compareString string
+
+  // Check for flag to build proper comparison strings
+  switch api.Flag {
+  case "a":
 
 Review comment:
   Make the a character a constant and use the const instead. 
 
----------------------------------------------------------------
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