add name to Command struct
This commit is contained in:
parent
e373e7e273
commit
39d889ecb6
@ -75,6 +75,7 @@ func RegisterCommand(name string, cmd Command) error {
|
|||||||
if _, ok := commandRegistry[name]; ok {
|
if _, ok := commandRegistry[name]; ok {
|
||||||
return fmt.Errorf("%s command is already registered")
|
return fmt.Errorf("%s command is already registered")
|
||||||
}
|
}
|
||||||
|
cmd.Name = name
|
||||||
commandRegistry[name] = cmd
|
commandRegistry[name] = cmd
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user