Skip to content

Commit

Permalink
var-naming: avoid allocations with (*regexp.Regexp).MatchString (#928)
Browse files Browse the repository at this point in the history
  • Loading branch information
Juneezee committed Nov 2, 2023
1 parent fd9a130 commit 573f715
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rule/var-naming.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 573f715

Please sign in to comment.