From 8e90c2bc1e19f2cf6e4c4f2985434e90d4584763 Mon Sep 17 00:00:00 2001
From: Benjamin Wenger <ben@elixxir.ioo>
Date: Thu, 1 Sep 2022 09:25:13 -0700
Subject: [PATCH] made the emoji init code simpler

---
 channels/emoji.go | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/channels/emoji.go b/channels/emoji.go
index 899bedbd4..5cbc38152 100644
--- a/channels/emoji.go
+++ b/channels/emoji.go
@@ -9,7 +9,6 @@ package channels
 
 import (
 	"bytes"
-	jww "github.com/spf13/jwalterweatherman"
 	"regexp"
 )
 
@@ -21,12 +20,7 @@ var compiledRegex *regexp.Regexp
 // compile the regular expression in an init so it is only
 // compiled once
 func init() {
-	var err error
-	compiledRegex, err = regexp.Compile(findEmoji)
-	if err != nil {
-		jww.FATAL.Panicf("failed to compile the regex for emoji finding " +
-			"within channels")
-	}
+	compiledRegex = regexp.MustCompile(findEmoji)
 }
 
 // ValidateReaction checks that the reaction only contains a single emoji.
-- 
GitLab