add name to Command struct

This commit is contained in:
Ryan Cavicchioni 2020-08-07 18:09:54 -05:00
parent e373e7e273
commit 39d889ecb6
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D

View File

@ -75,6 +75,7 @@ func RegisterCommand(name string, cmd Command) error {
if _, ok := commandRegistry[name]; ok {
return fmt.Errorf("%s command is already registered")
}
cmd.Name = name
commandRegistry[name] = cmd
return nil
}