Compare commits
No commits in common. "4325398ca898d740de8ab2a60480e90c46a06ac1" and "e373e7e273c47f9e64f0db37a1ac68642e06a776" have entirely different histories.
4325398ca8
...
e373e7e273
@ -27,7 +27,6 @@ type Command struct {
|
||||
Name string
|
||||
Func func(CmdArgs) (int, error)
|
||||
Flags *flag.FlagSet
|
||||
Use string
|
||||
}
|
||||
|
||||
var commandRegistry = make(map[string]Command)
|
||||
@ -76,7 +75,6 @@ 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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user