all: gofmt
Gofmt to update doc comments to the new formatting.
For golang/go#51082.
Change-Id: Id333e34e0c5cd0bea79dcf5dd51130639597b2ee
Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/399616
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
diff --git a/endpoints/endpoints.go b/endpoints/endpoints.go
index cd3e167..7cc37c8 100644
--- a/endpoints/endpoints.go
+++ b/endpoints/endpoints.go
@@ -19,7 +19,7 @@
// Battlenet is the endpoint for Battlenet.
var Battlenet = oauth2.Endpoint{
- AuthURL: "https://battle.net/oauth/authorize",
+ AuthURL: "https://battle.net/oauth/authorize",
TokenURL: "https://battle.net/oauth/token",
}
diff --git a/google/default.go b/google/default.go
index 880dd7b..dd00420 100644
--- a/google/default.go
+++ b/google/default.go
@@ -94,20 +94,20 @@
// It looks for credentials in the following places,
// preferring the first location found:
//
-// 1. A JSON file whose path is specified by the
-// GOOGLE_APPLICATION_CREDENTIALS environment variable.
-// For workload identity federation, refer to
-// https://cloud.google.com/iam/docs/how-to#using-workload-identity-federation on
-// how to generate the JSON configuration file for on-prem/non-Google cloud
-// platforms.
-// 2. A JSON file in a location known to the gcloud command-line tool.
-// On Windows, this is %APPDATA%/gcloud/application_default_credentials.json.
-// On other systems, $HOME/.config/gcloud/application_default_credentials.json.
-// 3. On Google App Engine standard first generation runtimes (<= Go 1.9) it uses
-// the appengine.AccessToken function.
-// 4. On Google Compute Engine, Google App Engine standard second generation runtimes
-// (>= Go 1.11), and Google App Engine flexible environment, it fetches
-// credentials from the metadata server.
+// 1. A JSON file whose path is specified by the
+// GOOGLE_APPLICATION_CREDENTIALS environment variable.
+// For workload identity federation, refer to
+// https://cloud.google.com/iam/docs/how-to#using-workload-identity-federation on
+// how to generate the JSON configuration file for on-prem/non-Google cloud
+// platforms.
+// 2. A JSON file in a location known to the gcloud command-line tool.
+// On Windows, this is %APPDATA%/gcloud/application_default_credentials.json.
+// On other systems, $HOME/.config/gcloud/application_default_credentials.json.
+// 3. On Google App Engine standard first generation runtimes (<= Go 1.9) it uses
+// the appengine.AccessToken function.
+// 4. On Google Compute Engine, Google App Engine standard second generation runtimes
+// (>= Go 1.11), and Google App Engine flexible environment, it fetches
+// credentials from the metadata server.
func FindDefaultCredentialsWithParams(ctx context.Context, params CredentialsParams) (*Credentials, error) {
// Make defensive copy of the slices in params.
params = params.deepCopy()
diff --git a/google/doc.go b/google/doc.go
index 8e6a57c..dddf651 100644
--- a/google/doc.go
+++ b/google/doc.go
@@ -15,14 +15,14 @@
// For more information on using workload identity federation, refer to
// https://cloud.google.com/iam/docs/how-to#using-workload-identity-federation.
//
-// OAuth2 Configs
+// # OAuth2 Configs
//
// Two functions in this package return golang.org/x/oauth2.Config values from Google credential
// data. Google supports two JSON formats for OAuth2 credentials: one is handled by ConfigFromJSON,
// the other by JWTConfigFromJSON. The returned Config can be used to obtain a TokenSource or
// create an http.Client.
//
-// Workload Identity Federation
+// # Workload Identity Federation
//
// Using workload identity federation, your application can access Google Cloud
// resources from Amazon Web Services (AWS), Microsoft Azure or any identity
@@ -36,9 +36,9 @@
// Follow the detailed instructions on how to configure Workload Identity Federation
// in various platforms:
//
-// Amazon Web Services (AWS): https://cloud.google.com/iam/docs/access-resources-aws
-// Microsoft Azure: https://cloud.google.com/iam/docs/access-resources-azure
-// OIDC identity provider: https://cloud.google.com/iam/docs/access-resources-oidc
+// Amazon Web Services (AWS): https://cloud.google.com/iam/docs/access-resources-aws
+// Microsoft Azure: https://cloud.google.com/iam/docs/access-resources-azure
+// OIDC identity provider: https://cloud.google.com/iam/docs/access-resources-oidc
//
// For OIDC providers, the library can retrieve OIDC tokens either from a
// local file location (file-sourced credentials) or from a local server
@@ -51,8 +51,7 @@
// return the OIDC token. The response can be in plain text or JSON.
// Additional required request headers can also be specified.
//
-//
-// Credentials
+// # Credentials
//
// The Credentials type represents Google credentials, including Application Default
// Credentials.