Skip to content

Commit 100bf44

Browse files
committed
net/http: fix some awkward wording in Request.WithContext docs
Change-Id: Ib37db42c7f1fd6aa55f70fd2d65d56bb2ae6d26a Reviewed-on: https://go-review.googlesource.com/c/go/+/211098 Reviewed-by: Bryan C. Mills <[email protected]>
1 parent c39cd41 commit 100bf44

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/net/http/request.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,8 @@ func (r *Request) Context() context.Context {
350350
// sending the request, and reading the response headers and body.
351351
//
352352
// To create a new request with a context, use NewRequestWithContext.
353-
// To change the context of a request (such as an incoming) you then
354-
// also want to modify to send back out, use Request.Clone. Between
353+
// To change the context of a request, such as an incoming request you
354+
// want to modify before sending back out, use Request.Clone. Between
355355
// those two uses, it's rare to need WithContext.
356356
func (r *Request) WithContext(ctx context.Context) *Request {
357357
if ctx == nil {

0 commit comments

Comments
 (0)