diff options
Diffstat (limited to 'commands/commands.go')
-rw-r--r-- | commands/commands.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/commands/commands.go b/commands/commands.go index 49a8b46..2890cdd 100644 --- a/commands/commands.go +++ b/commands/commands.go @@ -14,11 +14,10 @@ var ( commands map[string]AercCommand ) -func init() { - commands = make(map[string]AercCommand) -} - func Register(name string, cmd AercCommand) { + if commands == nil { + commands = make(map[string]AercCommand) + } commands[name] = cmd } |