lint: upgrade golangci-lint

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
This commit is contained in:
Ramkumar Chinchani
2021-12-13 19:23:31 +00:00
committed by Ravi Chamarthy
parent 5f04092e71
commit ac3801ea2d
71 changed files with 3038 additions and 2575 deletions
+4 -4
View File
@@ -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