Skip to content

Commit d2c4e0a

Browse files
alexandeargopherbot
authored andcommitted
oauth2: context instead of golang.org/x/net/context in doc
Change-Id: I377136feb07354904b2f27600f3aef0629ca76f2 Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/632295 Auto-Submit: Sean Liao <sean@liao.dev> Reviewed-by: Sean Liao <sean@liao.dev> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Junyang Shao <shaojunyang@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
1 parent 883dc3c commit d2c4e0a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

internal/transport.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
"net/http"
1010
)
1111

12-
// HTTPClient is the context key to use with golang.org/x/net/context's
13-
// WithValue function to associate an *http.Client value with a context.
12+
// HTTPClient is the context key to use with [context.WithValue]'s
13+
// function to associate an *http.Client value with a context.
1414
var HTTPClient ContextKey
1515

1616
// ContextKey is just an empty struct. It exists so HTTPClient can be

oauth2.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
)
2323

2424
// NoContext is the default context you should supply if not using
25-
// your own context.Context (see https://golang.org/x/net/context).
25+
// your own [context.Context].
2626
//
2727
// Deprecated: Use context.Background() or context.TODO() instead.
2828
var NoContext = context.TODO()
@@ -338,8 +338,8 @@ func (s staticTokenSource) Token() (*Token, error) {
338338
return s.t, nil
339339
}
340340

341-
// HTTPClient is the context key to use with golang.org/x/net/context's
342-
// WithValue function to associate an *http.Client value with a context.
341+
// HTTPClient is the context key to use with [context.WithValue]'s
342+
// function to associate an *http.Client value with a context.
343343
var HTTPClient internal.ContextKey
344344

345345
// NewClient creates an *http.Client from a Context and TokenSource.

0 commit comments

Comments
 (0)