mirror of https://github.com/golang/go.git
doc: describe vet -lostcancel in go1.7 release notes
Change-Id: Ie1c95fd0869307551bfcf76bf45c13372723fbba Reviewed-on: https://go-review.googlesource.com/24288 Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
parent
b65cb7f198
commit
eaf4ad6f74
|
|
@ -288,6 +288,18 @@ To avoid confusion with the new <code>-tests</code> check, the old, unadvertised
|
|||
<code>-test</code> option has been removed; it was equivalent to <code>-all</code> <code>-shadow</code>.
|
||||
</p>
|
||||
|
||||
<p id="vet_lostcancel">
|
||||
The <code>vet</code> command also has a new check,
|
||||
<code>-lostcancel</code>, which detects failure to call the
|
||||
cancellation function returned by the <code>WithCancel</code>,
|
||||
<code>WithTimeout</code>, and <code>WithDeadline</code> functions in
|
||||
Go 1.7's new <code>context</code> package (see <a
|
||||
href='#context'>below</a>).
|
||||
Failure to call the function prevents the new <code>Context</code>
|
||||
from being reclaimed until its parent is cancelled.
|
||||
(The background context is never cancelled.)
|
||||
</p>
|
||||
|
||||
<h3 id="cmd_dist">Go tool dist</h3>
|
||||
|
||||
<p>
|
||||
|
|
|
|||
Loading…
Reference in New Issue