summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2015-07-10 21:57:13 +0000
committerBrian Cully <bjc@kublai.com>2015-07-10 21:57:13 +0000
commit617f3e9236beb4343ded8380f886c25ab3d5b23f (patch)
treececf0237fa4279482aba36f1edae233caed32f88
parent9daadb1041ff5a8b3e952c5c8b59481856171273 (diff)
downloadxmppbot-617f3e9236beb4343ded8380f886c25ab3d5b23f.tar.gz
xmppbot-617f3e9236beb4343ded8380f886c25ab3d5b23f.zip
Use variadic AddHandlers()
-rw-r--r--xmppbot.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmppbot.go b/xmppbot.go
index 0c3c66d..4284fd2 100644
--- a/xmppbot.go
+++ b/xmppbot.go
@@ -18,14 +18,14 @@ func main() {
goctl.Logger.SetHandler(log15.StdoutHandler)
gc := goctl.NewGoctl(sockPath)
- if err := gc.AddHandlers([]goctl.Handler{
+ if err := gc.AddHandlers(
handlers.Dial{},
handlers.Login{},
handlers.Bind{},
handlers.Stop{C: stopChan},
handlers.Presence{},
handlers.Raw{},
- }); err != nil {
+ ); err != nil {
log15.Crit("Couldn't set up command handlers.", "error", err)
return
}