From 8a7efce941acf7123481d58c6bf5b5421c25736d Mon Sep 17 00:00:00 2001 From: Duco van Amstel Date: Wed, 5 Dec 2018 10:34:34 +0000 Subject: Move golangci-lint configuration to file (#635) --- bridge/irc/handlers.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'bridge/irc') 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 -- cgit v1.2.3