From 6d0dcdb718ac083eb914ef4e5165081d89ea2fad Mon Sep 17 00:00:00 2001 From: Patrick Connolly Date: Tue, 13 Nov 2018 17:49:54 +0800 Subject: [PATCH] Made go fmt happy. --- bridge/slack/helpers.go | 10 +++++----- gateway/gateway.go | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/bridge/slack/helpers.go b/bridge/slack/helpers.go index 952d0890..194832d4 100644 --- a/bridge/slack/helpers.go +++ b/bridge/slack/helpers.go @@ -262,11 +262,11 @@ func (b *Bslack) populateMessageWithBotInfo(ev *slack.MessageEvent, rmsg *config } var ( - mentionRE = regexp.MustCompile(`<@([a-zA-Z0-9]+)>`) - channelRE = regexp.MustCompile(`<#[a-zA-Z0-9]+\|(.+?)>`) - variableRE = regexp.MustCompile(``) - urlRE = regexp.MustCompile(`<(.*?)(\|.*?)?>`) - topicOrPurposeRE = regexp.MustCompile(`(?s)^@.+ set the channel (topic|purpose): (.+?)$`) + mentionRE = regexp.MustCompile(`<@([a-zA-Z0-9]+)>`) + channelRE = regexp.MustCompile(`<#[a-zA-Z0-9]+\|(.+?)>`) + variableRE = regexp.MustCompile(``) + urlRE = regexp.MustCompile(`<(.*?)(\|.*?)?>`) + topicOrPurposeRE = regexp.MustCompile(`(?s)^@.+ set the channel (topic|purpose): (.+?)$`) ) func (b *Bslack) extractTopicOrPurpose(text string) (updateType string, extracted string) { diff --git a/gateway/gateway.go b/gateway/gateway.go index 3f279dfa..2787d33a 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -279,7 +279,6 @@ func (gw *Gateway) handleMessage(msg config.Message, dest *bridge.Bridge) []*BrM } } - // broadcast to every out channel (irc QUIT) if msg.Channel == "" && msg.Event != config.EventJoinLeave { flog.Debug("empty channel")