mirror of https://github.com/golang/go.git
net/http/httptest: close res.Body in test
Signed-off-by: guoguangwu <guoguangwug@gmail.com>
This commit is contained in:
parent
2ab9218c86
commit
d19724c16d
|
|
@ -83,6 +83,7 @@ func testGetAfterClose(t *testing.T, newServer newServerFunc) {
|
|||
t.Fatal(err)
|
||||
}
|
||||
got, err := io.ReadAll(res.Body)
|
||||
res.Body.Close()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue