aboutsummaryrefslogtreecommitdiff
path: root/internal/db/issue_label.go
diff options
context:
space:
mode:
authorᴜɴᴋɴᴡᴏɴ <u@gogs.io>2020-01-29 19:36:57 +0800
committerGitHub <noreply@github.com>2020-01-29 19:36:57 +0800
commitb28fb9085185025415847d7075f1cdf83abb3b56 (patch)
tree0e0cc62b67546ebcd35c297cd35f097fe486b445 /internal/db/issue_label.go
parent8b7fa6627fb0f75adb8d1ca4ad953cf3b9b7dc87 (diff)
all: use lazyregexp (#5911)
* Use lazyregexp * all: fix imports and usages
Diffstat (limited to 'internal/db/issue_label.go')
-rw-r--r--internal/db/issue_label.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/db/issue_label.go b/internal/db/issue_label.go
index ab875771..b7a6029a 100644
--- a/internal/db/issue_label.go
+++ b/internal/db/issue_label.go
@@ -7,7 +7,6 @@ package db
import (
"fmt"
"html/template"
- "regexp"
"strconv"
"strings"
@@ -15,10 +14,11 @@ import (
api "github.com/gogs/go-gogs-client"
+ "gogs.io/gogs/internal/lazyregexp"
"gogs.io/gogs/internal/tool"
)
-var labelColorPattern = regexp.MustCompile("#([a-fA-F0-9]{6})")
+var labelColorPattern = lazyregexp.New("#([a-fA-F0-9]{6})")
// GetLabelTemplateFile loads the label template file by given name,
// then parses and returns a list of name-color pairs.