cmd/vet: warn about ignored error results
Closed this issue · 2 comments
campoy commented
With this code: package main func Do() error { return nil } func main() { Do() } I would like go vet to warn me that in the Do() call I'm implicitly ignoring the returned error. This makes sense since if Do returned anything else than the error I would be forced to explicitly ignore the error (or handle it). I understand this could be very noisy for fmt.*, so that package may be completely blacklisted from the check. On the other hand, this feature could avoid some common errors while using third party libs.
rsc commented
rsc commented