From 8cadc7340ac3267e5bc96a22d609875b188fa840 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Tue, 23 Jun 2020 03:19:08 -0400 Subject: [PATCH] don't trim line endings in IRCStreamConn Doesn't help if the line ends with regular \n only, and the parser has to account for \r and \n anyway --- irc/ircconn.go | 1 - 1 file changed, 1 deletion(-) diff --git a/irc/ircconn.go b/irc/ircconn.go index 87f9b584..b70a7984 100644 --- a/irc/ircconn.go +++ b/irc/ircconn.go @@ -76,7 +76,6 @@ func (cc *IRCStreamConn) ReadLine() (line []byte, err error) { if isPrefix { return nil, errReadQ } - line = bytes.TrimSuffix(line, crlf) if globalUtf8EnforcementSetting && !utf8.Valid(line) { err = errInvalidUtf8 }