mdeuser commented on a change in pull request #2334: Added --last Activation
Flag
URL:
https://github.com/apache/incubator-openwhisk/pull/2334#discussion_r121109552
##########
File path: tools/cli/go-whisk-cli/commands/activation.go
##########
@@ -224,6 +235,35 @@ var activationResultCmd = &cobra.Command{
return nil
},
}
+//lastFlag(args) retrieves the last activation with flag -l or --last
+//Param: Brings in []strings from args
+//Return: Returns an args([]string) with last ID used or the original args
with any errors
+func lastFlag(args []string) ([]string, error) {
+ //Checks to see if there is no ID sent with the last flag
+ //If an ID is given with the last flag then the ID will overide the flag
+ if flags.activation.last && len(args) == 0 {
Review comment:
This might cause some confusion. Does the user know which one was selected
when conflicting id/--last arguments are used on the same command line. IMHO,
this should be flagged as a usage error and not be permitted.
----------------------------------------------------------------
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