mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
GCLOUD: Stop using deprecated New() call (#1409)
This commit is contained in:
@ -9,6 +9,7 @@ import (
|
||||
"time"
|
||||
|
||||
"google.golang.org/api/googleapi"
|
||||
"google.golang.org/api/option"
|
||||
|
||||
gauth "golang.org/x/oauth2/google"
|
||||
|
||||
@ -77,7 +78,9 @@ func New(cfg map[string]string, metadata json.RawMessage) (providers.DNSServiceP
|
||||
}
|
||||
ctx := context.Background()
|
||||
hc := config.Client(ctx)
|
||||
dcli, err := gdns.New(hc)
|
||||
// FIXME(tlim): Is it a problem that ctx is included with hc and in
|
||||
// the call to NewService? Seems redundant.
|
||||
dcli, err := gdns.NewService(ctx, option.WithHTTPClient(hc))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user