diff --git a/channels/emoji.go b/channels/emoji.go index 5cbc381529c5ae91b67bde8d7ed07e0e359fe3b3..fb25f158584f4b6fc839108120dcfd531c222e40 100644 --- a/channels/emoji.go +++ b/channels/emoji.go @@ -15,13 +15,7 @@ import ( //based on emojis found at https://unicode.org/emoji/charts/full-emoji-list.html const findEmoji = `[\xA9\xAE\x{2000}-\x{3300}\x{1F000}-\x{1FBFF}]` -var compiledRegex *regexp.Regexp - -// compile the regular expression in an init so it is only -// compiled once -func init() { - compiledRegex = regexp.MustCompile(findEmoji) -} +var compiledRegex = regexp.MustCompile(findEmoji) // ValidateReaction checks that the reaction only contains a single emoji. func ValidateReaction(reaction string) error {