dubeejw commented on a change in pull request #2326: (Review) Alphabetize
URL:
https://github.com/apache/incubator-openwhisk/pull/2326#discussion_r124100181
##########
File path: tools/cli/go-whisk/whisk/action.go
##########
@@ -55,6 +56,44 @@ type ActionListOptions struct {
Skip int `url:"skip"`
Docs bool `url:"docs,omitempty"`
}
+/*
+ * Compare(s) compares 'action' to 'sortable' for the purpose of sorting.
+ * variables:
+ * actionToCompare: Action passed as parameter to be compared to 'action'.
+ * actionString: Compound string used for comparison based on the Action
+ * calling func Compare.
+ * compareString: Compound string used for comparison based on the
parameter.
+ * params: sortable that is also of type Action (REQUIRED).
+ * ***Method of type Sortable***
+ * ***By default, sorts Alphabetically***
+ */
+func(action Action) Compare(sortable Sortable) bool{
+ // convert sortable back to proper type
+ actionToCompare := sortable.(Action)
+ actionString := strings.ToLower(fmt.Sprintf("%s%s",action.Namespace,
action.Name))
Review comment:
Space after `"%s%s"`.
----------------------------------------------------------------
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