aboutsummaryrefslogtreecommitdiff
path: root/src/net/http
diff options
context:
space:
mode:
authoryincong <yincong@baidu.com>2025-01-06 02:10:08 +0000
committerGopher Robot <gobot@golang.org>2025-01-06 11:01:12 -0800
commit7a2e88e9117e838f258b175fa535f671396d13da (patch)
treea5ac8133477f9137e09e051f711a49cf03a21ccf /src/net/http
parentc112c0af1328ef0aae989ae20d27359a18f72543 (diff)
downloadgo-7a2e88e9117e838f258b175fa535f671396d13da.tar.xz
net/http: update NewRequestWithContext wrong link to NewRequest
Fixes #70874 Change-Id: Icbcfc95e6b45521880287dcc3bc8609461a3b401 GitHub-Last-Rev: 05276c56b019d8774e8eee881101509cf83c0f3d GitHub-Pull-Request: golang/go#70877 Reviewed-on: https://go-review.googlesource.com/c/go/+/637035 Reviewed-by: qiu laidongfeng2 <2645477756@qq.com> Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: David Chase <drchase@google.com> Auto-Submit: Ian Lance Taylor <iant@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/net/http')
-rw-r--r--src/net/http/request.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/net/http/request.go b/src/net/http/request.go
index 686d53345a..434c1640f3 100644
--- a/src/net/http/request.go
+++ b/src/net/http/request.go
@@ -873,9 +873,9 @@ func NewRequest(method, url string, body io.Reader) (*Request, error) {
//
// NewRequestWithContext returns a Request suitable for use with
// [Client.Do] or [Transport.RoundTrip]. To create a request for use with
-// testing a Server Handler, either use the [NewRequest] function in the
-// net/http/httptest package, use [ReadRequest], or manually update the
-// Request fields. For an outgoing client request, the context
+// testing a Server Handler, either use the [net/http/httptest.NewRequest] function,
+// use [ReadRequest], or manually update the Request fields.
+// For an outgoing client request, the context
// controls the entire lifetime of a request and its response:
// obtaining a connection, sending the request, and reading the
// response headers and body. See the Request type's documentation for