diff options
Diffstat (limited to 'connector')
-rw-r--r-- | connector/irc/config.go | 4 | ||||
-rw-r--r-- | connector/irc/irc.go | 2 | ||||
-rw-r--r-- | connector/mattermost/config.go | 4 | ||||
-rw-r--r-- | connector/mattermost/mattermost.go | 2 | ||||
-rw-r--r-- | connector/xmpp/config.go | 4 | ||||
-rw-r--r-- | connector/xmpp/xmpp.go | 2 |
6 files changed, 12 insertions, 6 deletions
diff --git a/connector/irc/config.go b/connector/irc/config.go index 33469ed..0b36473 100644 --- a/connector/irc/config.go +++ b/connector/irc/config.go @@ -4,8 +4,10 @@ import ( . "git.deuxfleurs.fr/Deuxfleurs/easybridge/connector" ) +const IRC_PROTOCOL = "IRC" + func init() { - Register("irc", Protocol{ + Register(IRC_PROTOCOL, Protocol{ NewConnector: func() Connector { return &IRC{} }, Schema: ConfigSchema{ &ConfigEntry{ diff --git a/connector/irc/irc.go b/connector/irc/irc.go index 977b71d..dafe9db 100644 --- a/connector/irc/irc.go +++ b/connector/irc/irc.go @@ -32,7 +32,7 @@ func (irc *IRC) SetHandler(h Handler) { } func (irc *IRC) Protocol() string { - return "irc" + return IRC_PROTOCOL } func (irc *IRC) Configure(c Configuration) error { diff --git a/connector/mattermost/config.go b/connector/mattermost/config.go index dd3bbbb..3be8f67 100644 --- a/connector/mattermost/config.go +++ b/connector/mattermost/config.go @@ -4,8 +4,10 @@ import ( . "git.deuxfleurs.fr/Deuxfleurs/easybridge/connector" ) +const MATTERMOST_PROTOCOL = "Mattermost" + func init() { - Register("mattermost", Protocol{ + Register(MATTERMOST_PROTOCOL, Protocol{ NewConnector: func() Connector { return &Mattermost{} }, Schema: ConfigSchema{ &ConfigEntry{ diff --git a/connector/mattermost/mattermost.go b/connector/mattermost/mattermost.go index 530938c..12ac604 100644 --- a/connector/mattermost/mattermost.go +++ b/connector/mattermost/mattermost.go @@ -49,7 +49,7 @@ func (mm *Mattermost) SetHandler(h Handler) { } func (mm *Mattermost) Protocol() string { - return "mattermost" + return MATTERMOST_PROTOCOL } func (mm *Mattermost) Configure(c Configuration) error { diff --git a/connector/xmpp/config.go b/connector/xmpp/config.go index a6abfac..a3a97ec 100644 --- a/connector/xmpp/config.go +++ b/connector/xmpp/config.go @@ -4,8 +4,10 @@ import ( . "git.deuxfleurs.fr/Deuxfleurs/easybridge/connector" ) +const XMPP_PROTOCOL = "XMPP" + func init() { - Register("xmpp", Protocol{ + Register(XMPP_PROTOCOL, Protocol{ NewConnector: func() Connector { return &XMPP{} }, Schema: ConfigSchema{ &ConfigEntry{ diff --git a/connector/xmpp/xmpp.go b/connector/xmpp/xmpp.go index fb34361..dcf1db6 100644 --- a/connector/xmpp/xmpp.go +++ b/connector/xmpp/xmpp.go @@ -43,7 +43,7 @@ func (xm *XMPP) SetHandler(h Handler) { } func (xm *XMPP) Protocol() string { - return "xmpp" + return XMPP_PROTOCOL } func (xm *XMPP) Configure(c Configuration) error { |