Open troian opened 4 years ago
Is there a linter for this in golangci-lint or elsewhere?
golangci-lint
I'd have to see some examples of issues from shadowing; I tend to prefer shadowing over using contrived names.
govet is for linter to detect such things
govet
One of cases when shadow may cause issues
func Foo() (n int, err error) { if true { err := fmt.Errorf("Invalid") return } return }
ah, cool. we're already running go vet here
go vet
Is there a linter for this in
golangci-lint
or elsewhere?I'd have to see some examples of issues from shadowing; I tend to prefer shadowing over using contrived names.