honeybadger-io / honeybadger-go

Send Go (golang) panics and errors to Honeybadger.
https://www.honeybadger.io/
MIT License
34 stars 15 forks source link

errcheck lint warnings #3

Closed joshuap closed 9 years ago

joshuap commented 9 years ago

This issue isn't necessarily actionable; it's just to provide some further documentation of lint warnings. Today I fixed all warnings but the following:

client.go:64:3:warning: error return value not checked (client.Notify(newError(err, 2))) (errcheck)
client.go:75:5:warning: error return value not checked (client.Notify(newError(err, 2), Params(r.Form), getCGIData(r), *r.URL)) (errcheck)
honeybadger.go:69:3:warning: error return value not checked (client.Notify(newError(err, 2))) (errcheck)
server.go:61:8:warning: error return value not checked (defer resp.Body.Close()) (errcheck)

In the first 3 I really don't want to do anything with an error if there is one (I'm already logging it to the logger, and in a recovered state I don't want to do extra error handling related to error notification). The last warning is because I am deferring resp.Body.Close(), which I took directly from the documentation for the http package; doesn't seem like it's a big deal.

mperham commented 9 years ago

:+1: