ctxutil

package
v0.0.0-...-2148625 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2023 License: Apache-2.0 Imports: 3 Imported by: 73

Documentation

Overview

Package ctxutil contains golang.org/x/net/context related utilities.

Index

Constants

This section is empty.

Variables

View Source
var HTTPClient = oauth2.HTTPClient

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.

We use the same value as the oauth2 package (which first introduced this key) rather than creating a new one and forcing users to possibly set two.

Functions

func Client

func Client(ctx context.Context) *http.Client

Client returns the HTTP client to use for the provided context. If ctx is non-nil and has an associated HTTP client, that client is returned. Otherwise, http.DefaultClient is returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL