Use []*Command instead of []Command in CommandsByName

main
Dan Buch 7 years ago
parent df5c6caa96
commit a372849da6
Signed by: meatballhat
GPG Key ID: 9685130D8B763EA7

@ -492,9 +492,7 @@ func main() {
Usage: "Load configuration from `FILE`",
},
},
}
app.Commands = []cli.Command{
Commands: []*cli.Command{
{
Name: "complete",
Aliases: []string{"c"},
@ -511,6 +509,7 @@ func main() {
return nil
},
},
},
}
sort.Sort(cli.FlagsByName(app.Flags))

@ -56,7 +56,7 @@ type Command struct {
CustomHelpTemplate string
}
type CommandsByName []Command
type CommandsByName []*Command
func (c CommandsByName) Len() int {
return len(c)

Loading…
Cancel
Save