Skip to content

Commit ae46f93

Browse files
rscnikolay-turpitko
authored andcommitted
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 <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Auto-Submit: Russ Cox <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent caadebe commit ae46f93

File tree

3 files changed

+21
-22
lines changed

3 files changed

+21
-22
lines changed

endpoints/endpoints.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ var Amazon = oauth2.Endpoint{
1919

2020
// Battlenet is the endpoint for Battlenet.
2121
var Battlenet = oauth2.Endpoint{
22-
AuthURL: "https://battle.net/oauth/authorize",
22+
AuthURL: "https://battle.net/oauth/authorize",
2323
TokenURL: "https://battle.net/oauth/token",
2424
}
2525

google/default.go

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

google/doc.go

+6-7
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
// For more information on using workload identity federation, refer to
1616
// https://cloud.google.com/iam/docs/how-to#using-workload-identity-federation.
1717
//
18-
// OAuth2 Configs
18+
// # OAuth2 Configs
1919
//
2020
// Two functions in this package return golang.org/x/oauth2.Config values from Google credential
2121
// data. Google supports two JSON formats for OAuth2 credentials: one is handled by ConfigFromJSON,
2222
// the other by JWTConfigFromJSON. The returned Config can be used to obtain a TokenSource or
2323
// create an http.Client.
2424
//
25-
// Workload Identity Federation
25+
// # Workload Identity Federation
2626
//
2727
// Using workload identity federation, your application can access Google Cloud
2828
// resources from Amazon Web Services (AWS), Microsoft Azure or any identity
@@ -36,9 +36,9 @@
3636
// Follow the detailed instructions on how to configure Workload Identity Federation
3737
// in various platforms:
3838
//
39-
// Amazon Web Services (AWS): https://cloud.google.com/iam/docs/access-resources-aws
40-
// Microsoft Azure: https://cloud.google.com/iam/docs/access-resources-azure
41-
// OIDC identity provider: https://cloud.google.com/iam/docs/access-resources-oidc
39+
// Amazon Web Services (AWS): https://cloud.google.com/iam/docs/access-resources-aws
40+
// Microsoft Azure: https://cloud.google.com/iam/docs/access-resources-azure
41+
// OIDC identity provider: https://cloud.google.com/iam/docs/access-resources-oidc
4242
//
4343
// For OIDC providers, the library can retrieve OIDC tokens either from a
4444
// local file location (file-sourced credentials) or from a local server
@@ -51,8 +51,7 @@
5151
// return the OIDC token. The response can be in plain text or JSON.
5252
// Additional required request headers can also be specified.
5353
//
54-
//
55-
// Credentials
54+
// # Credentials
5655
//
5756
// The Credentials type represents Google credentials, including Application Default
5857
// Credentials.

0 commit comments

Comments
 (0)