Capture immutable command declarations
This commit is contained in:
4
app.go
4
app.go
@@ -31,11 +31,11 @@ func New(identity Identity, commands ...Command) (*App, error) {
|
||||
identity: identity,
|
||||
commands: map[string]*commandNode{
|
||||
"help": {
|
||||
command: Command{name: "help", summary: "Show help for commands."},
|
||||
command: Command{record: &commandRecord{name: "help", summary: "Show help for commands."}},
|
||||
reserved: true,
|
||||
},
|
||||
"version": {
|
||||
command: Command{name: "version", summary: "Show application version."},
|
||||
command: Command{record: &commandRecord{name: "version", summary: "Show application version."}},
|
||||
reserved: true,
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user