diff --git a/go.mod b/go.mod index 3683d07..7f57930 100644 --- a/go.mod +++ b/go.mod @@ -5,11 +5,11 @@ go 1.17 require ( cloud.google.com/go/compute/metadata v0.2.0 github.com/google/go-cmp v0.5.8 - golang.org/x/net v0.5.0 google.golang.org/appengine v1.6.7 ) require ( github.com/golang/protobuf v1.5.2 // indirect + golang.org/x/net v0.5.0 // indirect google.golang.org/protobuf v1.28.0 // indirect ) diff --git a/internal/token.go b/internal/token.go index 355c386..b4723fc 100644 --- a/internal/token.go +++ b/internal/token.go @@ -19,8 +19,6 @@ import ( "strings" "sync" "time" - - "golang.org/x/net/context/ctxhttp" ) // Token represents the credentials used to authorize @@ -229,7 +227,7 @@ func RetrieveToken(ctx context.Context, clientID, clientSecret, tokenURL string, } func doTokenRoundTrip(ctx context.Context, req *http.Request) (*Token, error) { - r, err := ctxhttp.Do(ctx, ContextClient(ctx), req) + r, err := ContextClient(ctx).Do(req.WithContext(ctx)) if err != nil { return nil, err }