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:
authorfeistel <6742251-feistel@users.noreply.gitlab.com>2021-08-09 16:15:23 +0300
committerfeistel <6742251-feistel@users.noreply.gitlab.com>2021-08-09 16:15:23 +0300
commitdc6802f43525dc5308c0efa4b2ceb0bbfd6368c3 (patch)
tree2cf2c6cfb47ef93d5975430a3428fa1a88d9611c /internal/source
parente9a4602eb023d1db4c5a7b46b654a70e17fe022d (diff)
refactor: use newrequestwithcontext consistently
Diffstat (limited to 'internal/source')
-rw-r--r--internal/source/gitlab/client/client.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/internal/source/gitlab/client/client.go b/internal/source/gitlab/client/client.go
index f26bef10..31071fa8 100644
--- a/internal/source/gitlab/client/client.go
+++ b/internal/source/gitlab/client/client.go
@@ -203,13 +203,11 @@ func (gc *Client) endpoint(urlPath string, params url.Values) (*url.URL, error)
}
func (gc *Client) request(ctx context.Context, method string, endpoint *url.URL) (*http.Request, error) {
- req, err := http.NewRequest(method, endpoint.String(), nil)
+ req, err := http.NewRequestWithContext(ctx, method, endpoint.String(), nil)
if err != nil {
return nil, err
}
- req = req.WithContext(ctx)
-
token, err := gc.token()
if err != nil {
return nil, err