Capture immutable command declarations

This commit is contained in:
2026-10-11 01:15:13 +00:00
parent 476e98a463
commit de9bfdcc4c
16 changed files with 368 additions and 474 deletions

4
app.go
View File

@@ -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,
},
},