Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
go1.9 darwin/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
on MacOS X Sierra
What did you do?
I wrote this code below and then run go vet. err is never used or checked.
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
return body, resp.StatusCode, nil
}
What did you expect to see?
I expect that when I run $> go vet then I should see some error
notification that this err variable is not used or something.
What did you see instead?
None.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version)?go1.9 darwin/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env)?GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
on MacOS X Sierra
What did you do?
I wrote this code below and then run go vet. err is never used or checked.
What did you expect to see?
I expect that when I run $> go vet then I should see some error
notification that this err variable is not used or something.
What did you see instead?
None.