mirror of
https://github.com/mgechev/revive.git
synced 2024-11-28 08:49:11 +02:00
var-naming: avoid allocations with (*regexp.Regexp).MatchString
(#928)
This commit is contained in:
parent
fd9a130d7a
commit
573f7153c1
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user