File tree Expand file tree Collapse file tree 2 files changed +0
-7
lines changed Expand file tree Collapse file tree 2 files changed +0
-7
lines changed Original file line number Diff line number Diff line change @@ -229,8 +229,6 @@ func (a *App) Setup() {
229
229
a .separator .disabled = true
230
230
}
231
231
232
- var newCommands []* Command
233
-
234
232
for _ , c := range a .Commands {
235
233
cname := c .Name
236
234
if c .HelpName != "" {
@@ -239,9 +237,7 @@ func (a *App) Setup() {
239
237
c .separator = a .separator
240
238
c .HelpName = fmt .Sprintf ("%s %s" , a .HelpName , cname )
241
239
c .flagCategories = newFlagCategoriesFromFlags (c .Flags )
242
- newCommands = append (newCommands , c )
243
240
}
244
- a .Commands = newCommands
245
241
246
242
if a .Command (helpCommand .Name ) == nil && ! a .HideHelp {
247
243
if ! a .HideHelpCommand {
Original file line number Diff line number Diff line change @@ -132,15 +132,12 @@ func (c *Command) setup(ctx *Context) {
132
132
}
133
133
sort .Sort (c .categories .(* commandCategories ))
134
134
135
- var newCmds []* Command
136
135
for _ , scmd := range c .Subcommands {
137
136
if scmd .HelpName == "" {
138
137
scmd .HelpName = fmt .Sprintf ("%s %s" , c .HelpName , scmd .Name )
139
138
}
140
139
scmd .separator = c .separator
141
- newCmds = append (newCmds , scmd )
142
140
}
143
- c .Subcommands = newCmds
144
141
145
142
if c .BashComplete == nil {
146
143
c .BashComplete = DefaultCompleteWithFlags (c )
You can’t perform that action at this time.
0 commit comments