diff options
author | Wim <wim@42.be> | 2018-11-08 22:01:29 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2018-11-08 22:01:29 +0100 |
commit | 1e0bb3da954831d41ae958da22bf7294dbbe0822 (patch) | |
tree | 14519fd1bbab1f7111bd33a43c1148d19b0f8ee4 /bridge/slack/slack.go | |
parent | 59994da176f1bde83fb56e8c76f91edc3e549615 (diff) | |
download | matterbridge-msglm-1e0bb3da954831d41ae958da22bf7294dbbe0822.tar.gz matterbridge-msglm-1e0bb3da954831d41ae958da22bf7294dbbe0822.tar.bz2 matterbridge-msglm-1e0bb3da954831d41ae958da22bf7294dbbe0822.zip |
Make gocritic linter happier
Diffstat (limited to 'bridge/slack/slack.go')
-rw-r--r-- | bridge/slack/slack.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bridge/slack/slack.go b/bridge/slack/slack.go index 701f4769..814aeeac 100644 --- a/bridge/slack/slack.go +++ b/bridge/slack/slack.go @@ -98,13 +98,14 @@ func (b *Bslack) Connect() error { b.RLock() defer b.RUnlock() if b.GetString(incomingWebhookConfig) != "" { - if b.GetString(outgoingWebhookConfig) != "" { + switch { + case b.GetString(outgoingWebhookConfig) != "": b.Log.Info("Connecting using webhookurl (sending) and webhookbindaddress (receiving)") b.mh = matterhook.New(b.GetString(outgoingWebhookConfig), matterhook.Config{ InsecureSkipVerify: b.GetBool(skipTLSConfig), BindAddress: b.GetString(incomingWebhookConfig), }) - } else if b.GetString(tokenConfig) != "" { + case b.GetString(tokenConfig) != "": b.Log.Info("Connecting using token (sending)") b.sc = slack.New(b.GetString(tokenConfig)) b.rtm = b.sc.NewRTM() @@ -114,7 +115,7 @@ func (b *Bslack) Connect() error { InsecureSkipVerify: b.GetBool(skipTLSConfig), BindAddress: b.GetString(incomingWebhookConfig), }) - } else { + default: b.Log.Info("Connecting using webhookbindaddress (receiving)") b.mh = matterhook.New(b.GetString(outgoingWebhookConfig), matterhook.Config{ InsecureSkipVerify: b.GetBool(skipTLSConfig), |