]> Cypherpunks repositories - gostls13.git/commitdiff
doc: document net/http.Request.Cancel in go1.5.html
authorBrad Fitzpatrick <bradfitz@golang.org>
Mon, 20 Jul 2015 19:30:06 +0000 (12:30 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 20 Jul 2015 23:36:13 +0000 (23:36 +0000)
Change-Id: If1c12b43ef467c3ef2cbbaaba1bda4ea98032c7e
Reviewed-on: https://go-review.googlesource.com/12430
Reviewed-by: Rob Pike <r@golang.org>
doc/go1.5.html

index 282f0685b2e0686a8942cc60ecb1c0e5b3e39208..56adaa15584959074e5b635ecde63b379a2013b1 100644 (file)
@@ -1097,6 +1097,17 @@ For details, see the documentation for
 <a href="/pkg/net/http/#ResponseWriter"><code>ResponseWriter</code></a>.
 </li>
 
+<li>
+There is a new method to cancel a <a href="/pkg/net/http/"><code>net/http</code></a>
+<code>Request</code> by setting the new
+<a href="/pkg/net/http/#Request"><code>Request.Cancel</code></a>
+field.
+It is supported by <code>http.Transport</code>.
+The <code>Cancel</code> field's type is compatible with the
+<a href="https://godoc.org/golang.org/x/net/context"><code>context.Context.Done</code></a>
+return value.
+</li>
+
 <li>
 Also in the <a href="/pkg/net/http/"><code>net/http</code></a> package,
 there is code to ignore the zero <a href="/pkg/time/#Time"><code>Time</code></a> value