]> Cypherpunks repositories - gostls13.git/commit
net/http: correct Client.Do doc about context cancelation
authorManlio Perillo <manlio.perillo@gmail.com>
Thu, 27 May 2021 08:44:57 +0000 (10:44 +0200)
committerDamien Neil <dneil@google.com>
Thu, 27 May 2021 21:41:58 +0000 (21:41 +0000)
commit193d5141318d65cea310d995258288bd000d734c
tree7e7e31aa1602c5fb3469e0ffa94944056896b482
parentab2ef4aaa77dff91cd98ded88aeba0bf5b5b2e80
net/http: correct Client.Do doc about context cancelation

The documentation of the Client.Do method and Get function incorrectly
stated that, in case of context cancelation, the returned url.Error
Timeout method returns true.

Update the documentation to correctly match the implementation.
See also CL 200798 that, due to an oversight, corrected only the
documentation of the Client.Get method.

Remove a TODO note added in CL 125575 (net/http: document that Client
methods always return *url.Error), since it is no longer applicable
after CL 200798 (net/http: fix and lock-in Client.Do docs on request
cancelation).

Fixes #46402

Change-Id: Ied2ee971ba22b61777762dbb19f16e08686634ca
Reviewed-on: https://go-review.googlesource.com/c/go/+/323089
Reviewed-by: Damien Neil <dneil@google.com>
Trust: Michael Knyszek <mknyszek@google.com>
src/net/http/client.go