From 54b70c833fbb79bc843c93cb706cc4890a084462 Mon Sep 17 00:00:00 2001 From: Cody Oss Date: Mon, 6 Mar 2023 13:00:06 -0600 Subject: [PATCH] google: update missing auth help URL Update the URL to a newer page that better describes how to set up credentials in different environments. Change-Id: Ic0726fe298c543265d333cda60d62c235e4e2293 Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/473735 Reviewed-by: Dmitri Shuralyov Run-TryBot: Cody Oss Reviewed-by: Dmitri Shuralyov Auto-Submit: Cody Oss TryBot-Result: Gopher Robot --- google/default.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/google/default.go b/google/default.go index db6b19e..91b538b 100644 --- a/google/default.go +++ b/google/default.go @@ -19,6 +19,8 @@ import ( "golang.org/x/oauth2/authhandler" ) +const adcSetupURL = "https://cloud.google.com/docs/authentication/external/set-up-adc" + // Credentials holds Google credentials, including "Application Default Credentials". // For more details, see: // https://developers.google.com/accounts/docs/application-default-credentials @@ -158,8 +160,7 @@ func FindDefaultCredentialsWithParams(ctx context.Context, params CredentialsPar } // None are found; return helpful error. - const url = "https://developers.google.com/accounts/docs/application-default-credentials" - return nil, fmt.Errorf("google: could not find default credentials. See %v for more information.", url) + return nil, fmt.Errorf("google: could not find default credentials. See %v for more information", adcSetupURL) } // FindDefaultCredentials invokes FindDefaultCredentialsWithParams with the specified scopes.