4 ms·
Ping me if you have other gotchas you'd like to add. There'll be a few more soon (JSON, Cgo, etc).
by kylequest 8y ago
Ping me if you have other gotchas you'd like to add. There'll be a few more soon (JSON, Cgo, etc).
- isaachawley 8y agoThis is outdated and incorrect http://devs.cloudimmunity.com/gotchas-and-common-mistakes-in-go-golang/index.html#close_http_resp_body http://devs.cloudimmunity.com/gotchas-and-common-mistakes-in...
- sargas 8y agoHow so?
- isaachawley 8y ago> On error, any Response can be ignored. A non-nil Response with a non-nil error only occurs when CheckRedirect fails, and even then the returned Response.Body is already closed. https://golang.org/pkg/net/http/#Client.Do https://golang.org/pkg/net/http/#Client.Do