From 74e28788e62ed4fdcd068833e94d31dd36f728a7 Mon Sep 17 00:00:00 2001 From: Dzyanis Kuzmenka Date: Thu, 17 Mar 2022 23:07:54 +0300 Subject: [PATCH] fix forgotten close body --- .golangci.yml | 1 - test/e2e/pkg/request/request.go | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index ce902ad9..435548d6 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -85,7 +85,6 @@ linters: - whitespace - gofumpt - godot - # - gofmt - gocritic - gocognit - deadcode diff --git a/test/e2e/pkg/request/request.go b/test/e2e/pkg/request/request.go index 6d264783..939c8268 100644 --- a/test/e2e/pkg/request/request.go +++ b/test/e2e/pkg/request/request.go @@ -220,6 +220,7 @@ func (r *Request) sendHTTPRequest(method, urlstr string, host string, headers ma if err != nil { return nil, err } + defer resp.Body.Close() ret := &Response{Code: resp.StatusCode, Header: resp.Header} buf, err := io.ReadAll(resp.Body)