Skip to content

Commit fa882ec

Browse files
committed
use context.TODO() to fill needed argument
1 parent f2faf28 commit fa882ec

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scaleway/config.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package scaleway
22

33
import (
44
"bytes"
5+
"context"
56
"io"
67
"io/ioutil"
78
"log"
@@ -62,14 +63,14 @@ func (c *Config) Client() (*Client, error) {
6263
cl.RetryWaitMax = 2 * time.Minute
6364
cl.Logger = log.New(os.Stderr, "", 0)
6465
cl.RetryWaitMin = time.Minute
65-
cl.CheckRetry = func(resp *http.Response, err error) (bool, error) {
66+
cl.CheckRetry = func(_ context.Context, resp *http.Response, err error) (bool, error) {
6667
if resp == nil {
6768
return true, err
6869
}
6970
if resp.StatusCode == http.StatusTooManyRequests {
7071
return true, err
7172
}
72-
return retryablehttp.DefaultRetryPolicy(resp, err)
73+
return retryablehttp.DefaultRetryPolicy(context.TODO(), resp, err)
7374
}
7475
c.Client = &client{cl}
7576
},

0 commit comments

Comments
 (0)