We had ~30 one way, and these four new occurrences the other way.
Updates #11626
Change-Id: Ic6403dc4905874916ae292ff739d33482ed8e5bf
Reviewed-on: https://go-review.googlesource.com/24683
Reviewed-by: Rob Pike <r@golang.org>
<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>,
+cancelation 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>).
addop := ssa.OpAdd64F
subop := ssa.OpSub64F
pt := floatForComplex(n.Type) // Could be Float32 or Float64
- wt := Types[TFLOAT64] // Compute in Float64 to minimize cancellation error
+ wt := Types[TFLOAT64] // Compute in Float64 to minimize cancelation error
areal := s.newValue1(ssa.OpComplexReal, pt, a)
breal := s.newValue1(ssa.OpComplexReal, pt, b)
subop := ssa.OpSub64F
divop := ssa.OpDiv64F
pt := floatForComplex(n.Type) // Could be Float32 or Float64
- wt := Types[TFLOAT64] // Compute in Float64 to minimize cancellation error
+ wt := Types[TFLOAT64] // Compute in Float64 to minimize cancelation error
areal := s.newValue1(ssa.OpComplexReal, pt, a)
breal := s.newValue1(ssa.OpComplexReal, pt, b)
Mistakes involving tests including functions with incorrect names or signatures
and example tests that document identifiers not in the package.
-Failure to call the cancellation function returned by context.WithCancel.
+Failure to call the cancelation function returned by context.WithCancel.
Flag: -lostcancel
-The cancellation function returned by context.WithCancel, WithTimeout,
+The cancelation function returned by context.WithCancel, WithTimeout,
and WithDeadline must be called or the new context will remain live
until its parent context is cancelled.
(The background context is never cancelled.)
func init() {
register("lostcancel",
- "check for failure to call cancellation function returned by context.WithCancel",
+ "check for failure to call cancelation function returned by context.WithCancel",
checkLostCancel,
funcDecl, funcLit)
}