mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 04:17:55 +08:00
lint: upgrade golangci-lint
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
This commit is contained in:
committed by
Ravi Chamarthy
parent
5f04092e71
commit
ac3801ea2d
+4
-4
@@ -29,19 +29,19 @@ var (
|
||||
)
|
||||
|
||||
// match compiles the string to a regular expression.
|
||||
// nolint (gochecknoglobals)
|
||||
// nolint: gochecknoglobals
|
||||
var match = regexp.MustCompile
|
||||
|
||||
// literal compiles s into a literal regular expression, escaping any regexp
|
||||
// reserved characters.
|
||||
func literal(s string) *regexp.Regexp {
|
||||
re := match(regexp.QuoteMeta(s))
|
||||
regx := match(regexp.QuoteMeta(s))
|
||||
|
||||
if _, complete := re.LiteralPrefix(); !complete {
|
||||
if _, complete := regx.LiteralPrefix(); !complete {
|
||||
panic("must be a literal")
|
||||
}
|
||||
|
||||
return re
|
||||
return regx
|
||||
}
|
||||
|
||||
// expression defines a full expression, where each regular expression must
|
||||
|
||||
Reference in New Issue
Block a user