3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-13 07:29:30 +01: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.
var Commands = map[string]Command{
var Commands map[string]Command
func init() {
Commands = map[string]Command{
"ACC": {
handler: accHandler,
minParams: 3,
@ -305,4 +308,5 @@ var Commands = map[string]Command{
handler: whowasHandler,
minParams: 1,
},
}
}