From d2c4e0a6256426212864554628e234ebe6005347 Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Wed, 27 Nov 2024 22:29:03 +0200 Subject: [PATCH] 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 Reviewed-by: Sean Liao Reviewed-by: David Chase Reviewed-by: Junyang Shao LUCI-TryBot-Result: Go LUCI --- internal/transport.go | 4 ++-- oauth2.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/transport.go b/internal/transport.go index b9db01d..cb9656f 100644 --- a/internal/transport.go +++ b/internal/transport.go @@ -9,8 +9,8 @@ import ( "net/http" ) -// HTTPClient is the context key to use with golang.org/x/net/context's -// WithValue function to associate an *http.Client value with a context. +// HTTPClient is the context key to use with [context.WithValue]'s +// function to associate an *http.Client value with a context. var HTTPClient ContextKey // ContextKey is just an empty struct. It exists so HTTPClient can be diff --git a/oauth2.go b/oauth2.go index eacdd7f..52a085a 100644 --- a/oauth2.go +++ b/oauth2.go @@ -22,7 +22,7 @@ import ( ) // NoContext is the default context you should supply if not using -// your own context.Context (see https://golang.org/x/net/context). +// your own [context.Context]. // // Deprecated: Use context.Background() or context.TODO() instead. var NoContext = context.TODO() @@ -338,8 +338,8 @@ func (s staticTokenSource) Token() (*Token, error) { return s.t, nil } -// HTTPClient is the context key to use with golang.org/x/net/context's -// WithValue function to associate an *http.Client value with a context. +// HTTPClient is the context key to use with [context.WithValue]'s +// function to associate an *http.Client value with a context. var HTTPClient internal.ContextKey // NewClient creates an *http.Client from a Context and TokenSource.