Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime Martinez <jmartinez@gitlab.com>2020-07-14 10:18:42 +0300
committerJaime Martinez <jmartinez@gitlab.com>2020-07-24 07:49:29 +0300
commit1544f88bec36413b0775391a90e31ee8427a98ac (patch)
tree8a74d22dc1a5ecb1fd60e7eaaa7090dba75fcdc6
parent017bb1b79c7a9d9ccd45f831ad656c6f230f7839 (diff)
Remove resp.body close
-rw-r--r--internal/source/gitlab/client/client.go5
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
}