From 1544f88bec36413b0775391a90e31ee8427a98ac Mon Sep 17 00:00:00 2001 From: Jaime Martinez Date: Tue, 14 Jul 2020 17:18:42 +1000 Subject: Remove resp.body close --- internal/source/gitlab/client/client.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/source/gitlab/client/client.go b/internal/source/gitlab/client/client.go index 51e7eca0..1d4cde9f 100644 --- a/internal/source/gitlab/client/client.go +++ b/internal/source/gitlab/client/client.go @@ -109,11 +109,12 @@ func (gc *Client) GetLookup(ctx context.Context, host string) api.Lookup { // for source domain configuration. // Timeout is the same as -gitlab-client-http-timeout func (gc *Client) Status() error { - resp, err := gc.get(context.Background(), "/api/v4/internal/pages/status", url.Values{}) + // nolint: bodyclose + // this endpoint returns a http.StatusNoContent response + _, err := gc.get(context.Background(), "/api/v4/internal/pages/status", url.Values{}) if err != nil { return fmt.Errorf("%s: %v", ConnectionErrorMsg, err) } - defer resp.Body.Close() return nil } -- cgit v1.2.3