Skip to content

Commit

Permalink
Support passing del annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
ningyougang committed Aug 12, 2020
1 parent 3529787 commit 511637b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions commands/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,9 @@ func parseAction(cmd *cobra.Command, args []string, update bool) (*whisk.Action,
return nil, noArtifactError()
}

if update {
action.DelAnnotations = Flags.action.delAnnotation
}
whisk.Debug(whisk.DbgInfo, "Parsed action struct: %#v\n", action)
return action, err
}
Expand Down Expand Up @@ -1305,6 +1308,7 @@ func init() {
actionUpdateCmd.Flags().StringVarP(&Flags.common.paramFile, "param-file", "P", "", wski18n.T("`FILE` containing parameter values in JSON format"))
actionUpdateCmd.Flags().StringVar(&Flags.action.web, WEB_FLAG, "", wski18n.T("treat ACTION as a web action, a raw HTTP web action, or as a standard action; yes | true = web action, raw = raw HTTP web action, no | false = standard action"))
actionUpdateCmd.Flags().StringVar(&Flags.action.websecure, WEB_SECURE_FLAG, "", wski18n.T("secure the web action. where `SECRET` is true, false, or any string. Only valid when the ACTION is a web action"))
actionUpdateCmd.Flags().StringArrayVar(&Flags.action.delAnnotation,"del-annotation", []string{}, wski18n.T("del annotation"))

actionInvokeCmd.Flags().StringSliceVarP(&Flags.common.param, "param", "p", []string{}, wski18n.T("parameter values in `KEY VALUE` format"))
actionInvokeCmd.Flags().StringVarP(&Flags.common.paramFile, "param-file", "P", "", wski18n.T("`FILE` containing parameter values in JSON format"))
Expand Down
1 change: 1 addition & 0 deletions commands/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ type ActionFlags struct {
url bool
save bool
saveAs string
delAnnotation []string
}

func IsVerbose() bool {
Expand Down

0 comments on commit 511637b

Please sign in to comment.