4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-07-02 15:06:17 +00:00

Make gocritic linter happier

This commit is contained in:
Wim
2018-11-08 22:01:29 +01:00
parent 59994da176
commit 1e0bb3da95
4 changed files with 17 additions and 15 deletions

View File

@ -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),