This does not to be in init()

master
Robert Gerus 2015-12-22 13:51:36 +01:00
parent 183404c9e7
commit 0712fc1438
1 changed files with 2 additions and 4 deletions

View File

@ -16,8 +16,8 @@ import (
"github.com/arachnist/gorepost/irc" "github.com/arachnist/gorepost/irc"
) )
var trimTitle *regexp.Regexp var trimTitle = regexp.MustCompile("[\\s]+")
var trimLink *regexp.Regexp var trimLink = regexp.MustCompile("^.*?http")
var enc = charmap.ISO8859_2 var enc = charmap.ISO8859_2
func youtube(vid string) string { func youtube(vid string) string {
@ -124,7 +124,5 @@ func linktitle(output func(irc.Message), msg irc.Message) {
} }
func init() { func init() {
trimTitle = regexp.MustCompile("[\\s]+")
trimLink = regexp.MustCompile("^.*?http")
addCallback("PRIVMSG", "LINKTITLE", linktitle) addCallback("PRIVMSG", "LINKTITLE", linktitle)
} }