Skip to content

Commit

Permalink
Update check_no_globals.go
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch authored Sep 8, 2018
1 parent 4886830 commit e122cb3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions check_no_globals.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ func isWhitelisted(i *ast.Ident) bool {
return i.Name == "_" || looksLikeError(i)
}

// looksLikeError checks if the AST identifier starts with 'err' or 'Err'.
// looksLikeError returns true if the AST identifier starts with 'err' or 'Err'.
//
// See the following issue on how to further improve this func:
// https://github.com/leighmcculloch/gochecknoglobals/issues/5
// TODO: https://github.com/leighmcculloch/gochecknoglobals/issues/5
func looksLikeError(i *ast.Ident) bool {
prefix := "err"
if i.IsExported() {
Expand Down

0 comments on commit e122cb3

Please sign in to comment.