diff --git a/checkers/flagName_checker.go b/checkers/flagName_checker.go index e40efb524..1d43ba521 100644 --- a/checkers/flagName_checker.go +++ b/checkers/flagName_checker.go @@ -38,7 +38,7 @@ func (c *flagNameChecker) VisitExpr(expr ast.Expr) { } sym := calledExpr.Sel pkg := obj.Imported() - if !isStdlibPkg(pkg) || obj.Name() != "flag" { + if pkg.Path() != "flag" { return }