Use empty TODO context instead of nil
This commit is contained in:
parent
e079f301dd
commit
7e0b8b3d6a
1 changed files with 2 additions and 2 deletions
|
|
@ -20,9 +20,9 @@ type Client struct {
|
||||||
func (p *Provider) getClient() error {
|
func (p *Provider) getClient() error {
|
||||||
if p.client.vultr == nil {
|
if p.client.vultr == nil {
|
||||||
oauth_cfg := &oauth2.Config{}
|
oauth_cfg := &oauth2.Config{}
|
||||||
oauth_token_source := oauth_cfg.TokenSource(nil, &oauth2.Token{AccessToken: p.APIToken})
|
oauth_token_source := oauth_cfg.TokenSource(context.TODO(), &oauth2.Token{AccessToken: p.APIToken})
|
||||||
|
|
||||||
p.client.vultr = govultr.NewClient(oauth2.NewClient(nil, oauth_token_source))
|
p.client.vultr = govultr.NewClient(oauth2.NewClient(context.TODO(), oauth_token_source))
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue