diff options
author | Jaime Martinez <jmartinez@gitlab.com> | 2020-07-14 10:18:42 +0300 |
---|---|---|
committer | Jaime Martinez <jmartinez@gitlab.com> | 2020-07-24 07:49:29 +0300 |
commit | 1544f88bec36413b0775391a90e31ee8427a98ac (patch) | |
tree | 8a74d22dc1a5ecb1fd60e7eaaa7090dba75fcdc6 /internal/source/gitlab | |
parent | 017bb1b79c7a9d9ccd45f831ad656c6f230f7839 (diff) |
Remove resp.body close
Diffstat (limited to 'internal/source/gitlab')
-rw-r--r-- | internal/source/gitlab/client/client.go | 5 |
1 files 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 } |