From 70576f07de22e6581442a2b1b8eedf53d217d7c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Mengu=C3=A9?= Date: Mon, 23 Mar 2026 09:00:52 +0100 Subject: [PATCH] http/httpproxy: godoc fixes Doc improvements: - use godoc link to net/http - link use go.dev instead of golang.org - fix typo in ProxyFunc doc Change-Id: I7be0ebc78b3c34bc50fac6edc2c20a713478a315 Reviewed-on: https://go-review.googlesource.com/c/net/+/757980 Auto-Submit: Nicholas Husin Reviewed-by: Nicholas Husin Reviewed-by: Nicholas Husin Reviewed-by: Dmitri Shuralyov LUCI-TryBot-Result: Go LUCI --- http/httpproxy/proxy.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/http/httpproxy/proxy.go b/http/httpproxy/proxy.go index d89c257a..5ab499b0 100644 --- a/http/httpproxy/proxy.go +++ b/http/httpproxy/proxy.go @@ -3,8 +3,8 @@ // license that can be found in the LICENSE file. // Package httpproxy provides support for HTTP proxy determination -// based on environment variables, as provided by net/http's -// ProxyFromEnvironment function. +// based on environment variables, as provided by +// [net/http.ProxyFromEnvironment] function. // // The API is not subject to the Go 1 compatibility promise and may change at // any time. @@ -56,7 +56,7 @@ type Config struct { // presence of a REQUEST_METHOD environment variable). // When this is set, ProxyForURL will return an error // when HTTPProxy applies, because a client could be - // setting HTTP_PROXY maliciously. See https://golang.org/s/cgihttpproxy. + // setting HTTP_PROXY maliciously. See https://go.dev/s/cgihttpproxy. CGI bool } @@ -113,7 +113,7 @@ func getEnvAny(names ...string) string { // environment, or a proxy should not be used for the given request, as // defined by NO_PROXY. // -// As a special case, if req.URL.Host is "localhost" or a loopback address +// As a special case, if reqURL.Host is "localhost" or a loopback address // (with or without a port number), then a nil URL and nil error will be returned. func (cfg *Config) ProxyFunc() func(reqURL *url.URL) (*url.URL, error) { // Preprocess the Config settings for more efficient evaluation.