From b2819d13dbe19343426e688da4ddfeb57c8589fc Mon Sep 17 00:00:00 2001 From: abemotion Date: Fri, 4 Apr 2025 18:40:06 -0700 Subject: [PATCH] net/http: add link to types Some types are not linked. This change adds a link to each type. Change-Id: Id46fb64a74efb851ed76e4136f15e8fd9e445bb7 Reviewed-on: https://go-review.googlesource.com/c/go/+/663075 Reviewed-by: Damien Neil Reviewed-by: Dmitri Shuralyov Auto-Submit: Dmitri Shuralyov Reviewed-by: Sean Liao LUCI-TryBot-Result: Go LUCI --- src/net/http/client.go | 4 ++-- src/net/http/request.go | 2 +- src/net/http/responsecontroller.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/net/http/client.go b/src/net/http/client.go index 9231f63e65..a281a1ca6a 100644 --- a/src/net/http/client.go +++ b/src/net/http/client.go @@ -854,7 +854,7 @@ func Post(url, contentType string, body io.Reader) (resp *Response, err error) { // To make a request with a specified context.Context, use [NewRequestWithContext] // and [Client.Do]. // -// See the Client.Do method documentation for details on how redirects +// See the [Client.Do] method documentation for details on how redirects // are handled. func (c *Client) Post(url, contentType string, body io.Reader) (resp *Response, err error) { req, err := NewRequest("POST", url, body) @@ -894,7 +894,7 @@ func PostForm(url string, data url.Values) (resp *Response, err error) { // When err is nil, resp always contains a non-nil resp.Body. // Caller should close resp.Body when done reading from it. // -// See the Client.Do method documentation for details on how redirects +// See the [Client.Do] method documentation for details on how redirects // are handled. // // To make a request with a specified context.Context, use [NewRequestWithContext] diff --git a/src/net/http/request.go b/src/net/http/request.go index 8a765c3442..167cff585a 100644 --- a/src/net/http/request.go +++ b/src/net/http/request.go @@ -878,7 +878,7 @@ func NewRequest(method, url string, body io.Reader) (*Request, error) { // 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 +// response headers and body. See the [Request] type's documentation for // the difference between inbound and outbound request fields. // // If body is of type [*bytes.Buffer], [*bytes.Reader], or diff --git a/src/net/http/responsecontroller.go b/src/net/http/responsecontroller.go index f3f24c1273..785fa21d17 100644 --- a/src/net/http/responsecontroller.go +++ b/src/net/http/responsecontroller.go @@ -62,7 +62,7 @@ func (c *ResponseController) Flush() error { } // Hijack lets the caller take over the connection. -// See the Hijacker interface for details. +// See the [Hijacker] interface for details. func (c *ResponseController) Hijack() (net.Conn, *bufio.ReadWriter, error) { rw := c.rw for { -- 2.50.0