rabbah commented on a change in pull request #479: Trigger parameter issue
URL: https://github.com/apache/openwhisk-cli/pull/479#discussion_r371931439
##########
File path: commands/commands.go
##########
@@ -191,7 +192,17 @@ func parseArgs(args []string) ([]string, []string,
[]string, error) {
map[string]interface{}{"err": whiskErr})
whiskErr =
whisk.MakeWskError(errors.New(errMsg), whisk.EXIT_CODE_ERR_GENERAL,
whisk.DISPLAY_MSG,
whisk.DISPLAY_USAGE)
- return nil, nil, nil, whiskErr
+ return nil, nil, nil, nil, whiskErr
+ }
+ } else if args[i] == "-fp" || args[i] == "--feed-param" {
+ feedParamArgs, args, whiskErr = getKeyValueArgs(args,
i, feedParamArgs)
+ if whiskErr != nil {
+ whisk.Debug(whisk.DbgError,
"getKeyValueArgs(%#v, %d) failed: %s\n", args, i, whiskErr)
+ errMsg := wski18n.T("The parameter arguments
are invalid: {{.err}}",
Review comment:
I know this is mostly copy/paste but if you can instead use a constant in
https://github.com/apache/openwhisk-cli/blob/master/commands/messages.go we can
avoid replicating this error message in several places.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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