From 86ee6f12c51252db36c00b8a7866626aa3e648c3 Mon Sep 17 00:00:00 2001 From: Peter Hellberg <peter@c7.se> Date: Mon, 15 Dec 2014 01:37:58 +0100 Subject: [PATCH] Removed type from declaration (it will be inferred from the right-hand side) --- client.go | 2 +- colors.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client.go b/client.go index 5d6e777..ee73d67 100644 --- a/client.go +++ b/client.go @@ -338,7 +338,7 @@ func (c *Client) handleShell(channel ssh.Channel) { if !c.Server.IsOp(c) { c.SysMsg("You're not an admin.") } else { - var split []string = strings.SplitN(line, " ", 2) + var split = strings.SplitN(line, " ", 2) var msg string if len(split) > 1 { msg = split[1] diff --git a/colors.go b/colors.go index 73139e8..c0e5a0f 100644 --- a/colors.go +++ b/colors.go @@ -34,7 +34,7 @@ const ( var colors = []string{"31", "32", "33", "34", "35", "36", "37", "91", "92", "93", "94", "95", "96", "97"} // deColor is used for removing ANSI Escapes -var deColor *regexp.Regexp = regexp.MustCompile("\033\\[[\\d;]+m") +var deColor = regexp.MustCompile("\033\\[[\\d;]+m") // DeColorString removes all color from the given string func DeColorString(s string) string {