1
0
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:
Tom Limoncelli
2022-02-11 13:25:00 -05:00
committed by GitHub
parent f9c4887d95
commit 25d72395f3

View File

@ -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
}