diff --git a/rule/var-naming.go b/rule/var-naming.go index 886d8ae76..7f0ce7155 100644 --- a/rule/var-naming.go +++ b/rule/var-naming.go @@ -127,7 +127,7 @@ func (w *lintNames) check(id *ast.Ident, thing string) { // #851 upperCaseConst support // if it's const - if thing == token.CONST.String() && w.upperCaseConst && upperCaseConstRE.Match([]byte(id.Name)) { + if thing == token.CONST.String() && w.upperCaseConst && upperCaseConstRE.MatchString(id.Name) { return }