summaryrefslogtreecommitdiffstats
path: root/bridge
diff options
context:
space:
mode:
authorDuco van Amstel <duco.vanamstel@gmail.com>2018-12-05 10:34:34 +0000
committerWim <wim@42.be>2018-12-05 11:34:34 +0100
commit8a7efce941acf7123481d58c6bf5b5421c25736d (patch)
tree7d14beb624b2f81be630664bbf12904731aac0d4 /bridge
parentce73aa5a744bcbd3c076b141814d424268a19a7f (diff)
downloadmatterbridge-msglm-8a7efce941acf7123481d58c6bf5b5421c25736d.tar.gz
matterbridge-msglm-8a7efce941acf7123481d58c6bf5b5421c25736d.tar.bz2
matterbridge-msglm-8a7efce941acf7123481d58c6bf5b5421c25736d.zip
Move golangci-lint configuration to file (#635)
Diffstat (limited to 'bridge')
-rw-r--r--bridge/irc/handlers.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/bridge/irc/handlers.go b/bridge/irc/handlers.go
index 41d69b0a..c94ea892 100644
--- a/bridge/irc/handlers.go
+++ b/bridge/irc/handlers.go
@@ -3,7 +3,6 @@ package birc
import (
"bytes"
"fmt"
- "io"
"io/ioutil"
"regexp"
"strconv"
@@ -180,8 +179,6 @@ func (b *Birc) handlePrivMsg(client *girc.Client, event girc.Event) {
rmsg.Text = re.ReplaceAllString(rmsg.Text, "")
// start detecting the charset
- var r io.Reader
- var err error
mycharset := b.GetString("Charset")
if mycharset == "" {
// detect what were sending so that we convert it to utf-8
@@ -202,7 +199,7 @@ func (b *Birc) handlePrivMsg(client *girc.Client, event girc.Event) {
case "gbk", "gb18030", "gb2312", "big5", "euc-kr", "euc-jp", "shift-jis", "iso-2022-jp":
rmsg.Text = ic.ConvertString("utf-8", b.GetString("Charset"), rmsg.Text)
default:
- r, err = charset.NewReader(mycharset, strings.NewReader(rmsg.Text))
+ r, err := charset.NewReader(mycharset, strings.NewReader(rmsg.Text))
if err != nil {
b.Log.Errorf("charset to utf-8 conversion failed: %s", err)
return