3
0
mirror of https://github.com/ergochat/ergo.git synced 2025-05-04 05:37:39 +02:00

move Commands initialization to an init()

This commit is contained in:
Shivaram Lingamneni 2018-01-22 13:50:58 -05:00
parent 62fc2c0cc3
commit 728863a17c

View File

@ -53,7 +53,10 @@ func (cmd *Command) Run(server *Server, client *Client, msg ircmsg.IrcMessage) b
} }
// Commands holds all commands executable by a client connected to us. // Commands holds all commands executable by a client connected to us.
var Commands = map[string]Command{ var Commands map[string]Command
func init() {
Commands = map[string]Command{
"ACC": { "ACC": {
handler: accHandler, handler: accHandler,
minParams: 3, minParams: 3,
@ -305,4 +308,5 @@ var Commands = map[string]Command{
handler: whowasHandler, handler: whowasHandler,
minParams: 1, minParams: 1,
}, },
}
} }