From 9d2452633c399ae98662d19fba3ba487db139fba Mon Sep 17 00:00:00 2001 From: Marvin Preuss Date: Mon, 31 Jan 2022 09:13:28 +0100 Subject: [PATCH] happy linting --- methodsallowed/methodsallowed_test.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/methodsallowed/methodsallowed_test.go b/methodsallowed/methodsallowed_test.go index e1872df..b214848 100644 --- a/methodsallowed/methodsallowed_test.go +++ b/methodsallowed/methodsallowed_test.go @@ -52,11 +52,7 @@ func TestAllow(t *testing.T) { allow.ServeHTTP(w, req) resp := w.Result() - t.Cleanup(func() { resp.Body.Close() }) - - t.Cleanup(func() { - resp.Body.Close() - }) + defer resp.Body.Close() body, _ := io.ReadAll(resp.Body)