aboutsummaryrefslogtreecommitdiff
path: root/fasthttputil
diff options
context:
space:
mode:
authorGravatar Oleksandr Redko <oleksandr.red+github@gmail.com> 2023-02-15 12:54:23 +0200
committerGravatar GitHub <noreply@github.com> 2023-02-15 11:54:23 +0100
commitb79a03aaf94639119b26b5c6fef101b812c67d29 (patch)
treefc947aa7b9cdd5203b2f647337dc099b7c701650 /fasthttputil
parentdocs: Deprecate ErrAlreadyServing as never returning (#1491) (diff)
downloadfasthttp-b79a03aaf94639119b26b5c6fef101b812c67d29.tar.gz
fasthttp-b79a03aaf94639119b26b5c6fef101b812c67d29.tar.bz2
fasthttp-b79a03aaf94639119b26b5c6fef101b812c67d29.zip
test: close response body (#1496)
Diffstat (limited to 'fasthttputil')
-rw-r--r--fasthttputil/inmemory_listener_test.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/fasthttputil/inmemory_listener_test.go b/fasthttputil/inmemory_listener_test.go
index e9d5125..cbaa6df 100644
--- a/fasthttputil/inmemory_listener_test.go
+++ b/fasthttputil/inmemory_listener_test.go
@@ -146,6 +146,7 @@ func testInmemoryListenerHTTPSingle(t *testing.T, client *http.Client, content s
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
+ defer func() { _ = res.Body.Close() }()
b, err := io.ReadAll(res.Body)
if err != nil {
t.Fatalf("unexpected error: %v", err)