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.

        Source Files