From 162247b8a5268b3da0f871dd1ae918b2a660d460 Mon Sep 17 00:00:00 2001 From: holooooo <844082183@qq.com> Date: Mon, 24 May 2021 11:26:52 +0800 Subject: [PATCH] fix lint --- client/httplib/httpclient_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/httplib/httpclient_test.go b/client/httplib/httpclient_test.go index daedece3..e13bdf74 100644 --- a/client/httplib/httpclient_test.go +++ b/client/httplib/httpclient_test.go @@ -199,6 +199,7 @@ func TestClient_Delete(t *testing.T) { if err != nil { t.Fatal(err) } + defer resp.Resp.Body.Close() assert.NotNil(t, resp) assert.Equal(t, http.MethodDelete, resp.Resp.Request.Method) } @@ -214,6 +215,7 @@ func TestClient_Head(t *testing.T) { if err != nil { t.Fatal(err) } + defer resp.Resp.Body.Close() assert.NotNil(t, resp) assert.Equal(t, http.MethodHead, resp.Resp.Request.Method) }