google: use GoogleClientConfig

This commit is contained in:
Yousong Zhou
2020-03-22 19:36:43 +08:00
parent ce0e9dd689
commit 554e2e88dc
5 changed files with 87 additions and 55 deletions
+8 -1
View File
@@ -94,7 +94,14 @@ func newClient(options *BaseOptions) (*google.SRegion, error) {
return nil, fmt.Errorf("Missing ProjectID")
}
cli, err := google.NewGoogleClient("", "", options.ProjectID, options.ClientEmail, options.PrivateKeyID, options.PrivateKey, options.Debug)
cli, err := google.NewGoogleClient(
google.NewGoogleClientConfig(
options.ProjectID,
options.ClientEmail,
options.PrivateKeyID,
options.PrivateKey,
).Debug(options.Debug),
)
if err != nil {
return nil, err
}