Skip to content

Commit c9698e9

Browse files
committed
Args and options need to be maps somehow
1 parent 9e3a783 commit c9698e9

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

commands/list_models.go

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,12 @@ func innerProjectInitCommand(cnf *config.Config) Command {
3636
},
3737
},
3838
Definition: Definition{
39-
Arguments: []Argument{},
40-
Options: []Option{
41-
HelpOption,
42-
VerboseOption,
43-
VersionOption,
44-
YesOption,
45-
noInteractionOption,
39+
Options: map[string]Option{
40+
"help": HelpOption,
41+
"verbose": VerboseOption,
42+
"version": VersionOption,
43+
"yes": YesOption,
44+
"no-interaction": noInteractionOption,
4645
},
4746
},
4847
Hidden: false,
@@ -72,13 +71,12 @@ func innerAppConfigValidateCommand(cnf *config.Config) Command {
7271
},
7372
},
7473
Definition: Definition{
75-
Arguments: []Argument{},
76-
Options: []Option{
77-
HelpOption,
78-
VerboseOption,
79-
VersionOption,
80-
YesOption,
81-
noInteractionOption,
74+
Options: map[string]Option{
75+
"help": HelpOption,
76+
"verbose": VerboseOption,
77+
"version": VersionOption,
78+
"yes": YesOption,
79+
"no-interaction": noInteractionOption,
8280
},
8381
},
8482
Hidden: false,
@@ -206,8 +204,8 @@ type Example struct {
206204
}
207205

208206
type Definition struct {
209-
Arguments []Argument `json:"arguments"`
210-
Options []Option `json:"options"`
207+
Arguments map[string]Argument `json:"arguments"`
208+
Options map[string]Option `json:"options"`
211209
}
212210

213211
type Argument struct {

0 commit comments

Comments
 (0)