From 01e337832b6a8ea84169c390ce41260a4d710a08 Mon Sep 17 00:00:00 2001 From: Sukhjit Singh Date: Wed, 15 Dec 2021 17:20:17 +1100 Subject: [PATCH] Close response body --- mux_httpserver_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mux_httpserver_test.go b/mux_httpserver_test.go index 907ab91..4333346 100644 --- a/mux_httpserver_test.go +++ b/mux_httpserver_test.go @@ -25,6 +25,8 @@ func TestSchemeMatchers(t *testing.T) { if err != nil { t.Fatalf("unexpected error getting from server: %v", err) } + defer resp.Body.Close() + if resp.StatusCode != 200 { t.Fatalf("expected a status code of 200, got %v", resp.StatusCode) }