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>
This commit is contained in:
Russ Cox 2022-04-11 13:11:36 -04:00 committed by Gopher Robot
parent 6242fa9171
commit 9780585627
3 changed files with 21 additions and 22 deletions

View File

@ -19,7 +19,7 @@ var Amazon = oauth2.Endpoint{
// Battlenet is the endpoint for Battlenet. // Battlenet is the endpoint for Battlenet.
var Battlenet = oauth2.Endpoint{ var Battlenet = oauth2.Endpoint{
AuthURL: "https://battle.net/oauth/authorize", AuthURL: "https://battle.net/oauth/authorize",
TokenURL: "https://battle.net/oauth/token", TokenURL: "https://battle.net/oauth/token",
} }

View File

@ -94,20 +94,20 @@ func DefaultTokenSource(ctx context.Context, scope ...string) (oauth2.TokenSourc
// It looks for credentials in the following places, // It looks for credentials in the following places,
// preferring the first location found: // preferring the first location found:
// //
// 1. A JSON file whose path is specified by the // 1. A JSON file whose path is specified by the
// GOOGLE_APPLICATION_CREDENTIALS environment variable. // GOOGLE_APPLICATION_CREDENTIALS environment variable.
// For workload identity federation, refer to // For workload identity federation, refer to
// https://cloud.google.com/iam/docs/how-to#using-workload-identity-federation on // 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 // how to generate the JSON configuration file for on-prem/non-Google cloud
// platforms. // platforms.
// 2. A JSON file in a location known to the gcloud command-line tool. // 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 Windows, this is %APPDATA%/gcloud/application_default_credentials.json.
// On other systems, $HOME/.config/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 // 3. On Google App Engine standard first generation runtimes (<= Go 1.9) it uses
// the appengine.AccessToken function. // the appengine.AccessToken function.
// 4. On Google Compute Engine, Google App Engine standard second generation runtimes // 4. On Google Compute Engine, Google App Engine standard second generation runtimes
// (>= Go 1.11), and Google App Engine flexible environment, it fetches // (>= Go 1.11), and Google App Engine flexible environment, it fetches
// credentials from the metadata server. // credentials from the metadata server.
func FindDefaultCredentialsWithParams(ctx context.Context, params CredentialsParams) (*Credentials, error) { func FindDefaultCredentialsWithParams(ctx context.Context, params CredentialsParams) (*Credentials, error) {
// Make defensive copy of the slices in params. // Make defensive copy of the slices in params.
params = params.deepCopy() params = params.deepCopy()

View File

@ -15,14 +15,14 @@
// For more information on using workload identity federation, refer to // For more information on using workload identity federation, refer to
// https://cloud.google.com/iam/docs/how-to#using-workload-identity-federation. // 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 // 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, // 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 // the other by JWTConfigFromJSON. The returned Config can be used to obtain a TokenSource or
// create an http.Client. // create an http.Client.
// //
// Workload Identity Federation // # Workload Identity Federation
// //
// Using workload identity federation, your application can access Google Cloud // Using workload identity federation, your application can access Google Cloud
// resources from Amazon Web Services (AWS), Microsoft Azure or any identity // 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 // Follow the detailed instructions on how to configure Workload Identity Federation
// in various platforms: // in various platforms:
// //
// Amazon Web Services (AWS): https://cloud.google.com/iam/docs/access-resources-aws // Amazon Web Services (AWS): https://cloud.google.com/iam/docs/access-resources-aws
// Microsoft Azure: https://cloud.google.com/iam/docs/access-resources-azure // Microsoft Azure: https://cloud.google.com/iam/docs/access-resources-azure
// OIDC identity provider: https://cloud.google.com/iam/docs/access-resources-oidc // OIDC identity provider: https://cloud.google.com/iam/docs/access-resources-oidc
// //
// For OIDC providers, the library can retrieve OIDC tokens either from a // For OIDC providers, the library can retrieve OIDC tokens either from a
// local file location (file-sourced credentials) or from a local server // 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. // return the OIDC token. The response can be in plain text or JSON.
// Additional required request headers can also be specified. // Additional required request headers can also be specified.
// //
// // # Credentials
// Credentials
// //
// The Credentials type represents Google credentials, including Application Default // The Credentials type represents Google credentials, including Application Default
// Credentials. // Credentials.