1
0
mirror of https://github.com/golang/go synced 2024-09-30 16:08:36 -06:00

net/http: make DefaultTransport docs about HTTP proxy consistent

The changes improve the documentation for DefaultTransport, making
the style with how the HTTP proxy environment variables are being
referred to, consistent with the rest of the project's
documentation.

Also mention HTTPS_PROXY environment variables, as suggested in #32649.

Change-Id: I4e6b49881d7b30b5a0d4699531fa7c2929fc49f7
GitHub-Last-Rev: 2fc751937b
GitHub-Pull-Request: golang/go#54996
Reviewed-on: https://go-review.googlesource.com/c/go/+/430135
Reviewed-by: Damien Neil <dneil@google.com>
Auto-Submit: Jenny Rakoczy <jenny@golang.org>
Run-TryBot: Damien Neil <dneil@google.com>
Reviewed-by: Jenny Rakoczy <jenny@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
Vladimir Varankin 2022-09-10 20:07:36 +00:00 committed by Gopher Robot
parent 5bbee7a095
commit 39b31a3eb2

View File

@ -38,8 +38,8 @@ import (
// DefaultTransport is the default implementation of Transport and is // DefaultTransport is the default implementation of Transport and is
// used by DefaultClient. It establishes network connections as needed // used by DefaultClient. It establishes network connections as needed
// and caches them for reuse by subsequent calls. It uses HTTP proxies // and caches them for reuse by subsequent calls. It uses HTTP proxies
// as directed by the $HTTP_PROXY and $NO_PROXY (or $http_proxy and // as directed by the environment variables HTTP_PROXY, HTTPS_PROXY
// $no_proxy) environment variables. // and NO_PROXY (or the lowercase versions thereof).
var DefaultTransport RoundTripper = &Transport{ var DefaultTransport RoundTripper = &Transport{
Proxy: ProxyFromEnvironment, Proxy: ProxyFromEnvironment,
DialContext: defaultTransportDialContext(&net.Dialer{ DialContext: defaultTransportDialContext(&net.Dialer{