Skip to content

Commit

Permalink
checkers: simplify flagName (go-critic#799)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludweeg authored Feb 4, 2019
1 parent 6bce9d0 commit 4adbf9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion checkers/flagName_checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 4adbf9a

Please sign in to comment.