From 4a4c7f397c6b68913ded21b792e4b41620e852ee Mon Sep 17 00:00:00 2001 From: Chris Rhodes Date: Mon, 18 Feb 2013 17:33:55 -0800 Subject: [PATCH] Regexes are consts. --- client/funcs.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/funcs.go b/client/funcs.go index 0e8cec9..61c9c12 100644 --- a/client/funcs.go +++ b/client/funcs.go @@ -29,7 +29,7 @@ type youTubeVideo struct { } `json:entry` } -var UrlRegex string = `(\s|^)(http://|https://)(.*?)(\s|$)` +const UrlRegex string = `(\s|^)(http://|https://)(.*?)(\s|$)` func UrlFunc(conn *Conn, line *Line) { text := line.Message() @@ -52,7 +52,7 @@ func UrlFunc(conn *Conn, line *Line) { } } -var YouTubeRegex string = `(\s|^)(http://|https://)?(www.)?(youtube.com/watch\?v=|youtu.be/)(.*?)(\s|$|\&|#)` +const YouTubeRegex string = `(\s|^)(http://|https://)?(www.)?(youtube.com/watch\?v=|youtu.be/)(.*?)(\s|$|\&|#)` func YouTubeFunc(conn *Conn, line *Line) { text := line.Message()