1
0
mirror of https://github.com/golang/go synced 2024-11-12 05:40:22 -07:00

net/http: eliminate defined-but-not-used var.

gc does not report this as an error, but go/types does.
(I suspect that constructing a closure counts as a reference
to &all in gc's implementation).

This is not a tool bug, since the spec doesn't require
implementations to implement this check, but it does
illustrate that dialect variations are always a nuisance.

LGTM=rsc, bradfitz
R=bradfitz
CC=golang-codereviews, gri, rsc
https://golang.org/cl/73850043
This commit is contained in:
Alan Donovan 2014-03-10 22:22:51 -04:00
parent 1306279cd1
commit cf57cf17e7

View File

@ -886,11 +886,9 @@ func TestClientTimeout(t *testing.T) {
t.Fatal("handler never got /slow request")
}
var all []byte
errc := make(chan error, 1)
go func() {
var err error
all, err = ioutil.ReadAll(res.Body)
_, err := ioutil.ReadAll(res.Body)
errc <- err
res.Body.Close()
}()