type Dialer … type Auth … // FromEnvironment returns the dialer specified by the proxy-related // variables in the environment and makes underlying connections // directly. func FromEnvironment() Dialer { … } // FromEnvironmentUsing returns the dialer specify by the proxy-related // variables in the environment and makes underlying connections // using the provided forwarding Dialer (for instance, a *net.Dialer // with desired configuration). func FromEnvironmentUsing(forward Dialer) Dialer { … } var proxySchemes … // RegisterDialerType takes a URL scheme and a function to generate Dialers from // a URL with that scheme and a forwarding Dialer. Registered schemes are used // by FromURL. func RegisterDialerType(scheme string, f func(*url.URL, Dialer) (Dialer, error)) { … } // FromURL returns a Dialer given a URL specification and an underlying // Dialer for it to make network requests. func FromURL(u *url.URL, forward Dialer) (Dialer, error) { … } var allProxyEnv … var noProxyEnv … type envOnce … func (e *envOnce) Get() string { … } func (e *envOnce) init() { … } // reset is used by tests func (e *envOnce) reset() { … }