mdeuser commented on a change in pull request #2334: Added --last Activation
Flag
URL:
https://github.com/apache/incubator-openwhisk/pull/2334#discussion_r121006649
##########
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:
What is behavior when activation id and `--last` are both supplied as cli
arguments? This seems conflicting and should be flagged as an usage error.
----------------------------------------------------------------
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