@@ -99,11 +99,11 @@ func NewConfigCreateCommand(functionService api.FunctionService) (*cobra.Command
99
99
100
100
func NewConfigUpdateCommand (functionService api.FunctionService ) (* cobra.Command , error ) {
101
101
cmd := & cobra.Command {
102
- Use : "update" ,
102
+ Use : "update <config_name> " ,
103
103
Short : "Update a function config for a Channels app" ,
104
- Args : cobra .NoArgs ,
104
+ Args : cobra .ExactArgs ( 1 ) ,
105
105
RunE : func (cmd * cobra.Command , args []string ) error {
106
- config , err := functionService .UpdateFunctionConfig (commands .AppID , commands . FunctionConfigName , commands .FunctionConfigDescription , commands .FunctionConfigContent )
106
+ config , err := functionService .UpdateFunctionConfig (commands .AppID , args [ 0 ] , commands .FunctionConfigDescription , commands .FunctionConfigContent )
107
107
if err != nil {
108
108
return err
109
109
}
@@ -118,13 +118,8 @@ func NewConfigUpdateCommand(functionService api.FunctionService) (*cobra.Command
118
118
},
119
119
}
120
120
cmd .PersistentFlags ().BoolVar (& commands .OutputAsJSON , "json" , false , "" )
121
- cmd .PersistentFlags ().StringVar (& commands .FunctionConfigName , "name" , "" , "Function config name. Can only contain A-Za-z0-9-_" )
122
- err := cmd .MarkPersistentFlagRequired ("name" )
123
- if err != nil {
124
- return nil , err
125
- }
126
121
cmd .PersistentFlags ().StringVar (& commands .FunctionConfigDescription , "description" , "" , "Function config description" )
127
- err = cmd .MarkPersistentFlagRequired ("description" )
122
+ err : = cmd .MarkPersistentFlagRequired ("description" )
128
123
if err != nil {
129
124
return nil , err
130
125
}
@@ -138,7 +133,7 @@ func NewConfigUpdateCommand(functionService api.FunctionService) (*cobra.Command
138
133
139
134
func NewConfigDeleteCommand (functionService api.FunctionService ) * cobra.Command {
140
135
cmd := & cobra.Command {
141
- Use : "delete" ,
136
+ Use : "delete <config_name> " ,
142
137
Short : "Delete a function config from a Channels app" ,
143
138
Args : cobra .ExactArgs (1 ),
144
139
RunE : func (cmd * cobra.Command , args []string ) error {
0 commit comments