1
0
Fork 0
mirror of https://github.com/fluffle/goirc synced 2025-07-01 02:53:53 +00:00

Fix comments and my poor code-reading skills. Damn you StalkR :-)

This commit is contained in:
Alex Bramley 2013-03-10 12:17:16 +00:00
parent 2c5b477233
commit d6cb0bb026
2 changed files with 22 additions and 9 deletions

View file

@ -30,16 +30,10 @@ const (
WHOIS = "WHOIS"
)
// this file contains the various commands you can
// send to the server using an Conn connection
// This could be a lot less ugly with the ability to manipulate
// the symbol table and add methods/functions on the fly
// [ CMD, FMT, FMTARGS ] etc.
// cutNewLines() pares down a string to the part before the first "\r" or "\n"
func cutNewLines(s string) string {
r := strings.SplitN(s, "\\r", 2)
r = strings.SplitN(r[0], "\\n", 2)
r := strings.SplitN(s, "\r", 2)
r = strings.SplitN(r[0], "\n", 2)
return r[0]
}