Debian Codegraph @

go/analysis/passes/lostcancel/doc.go

raw symbols SCIP
1 // Copyright 2023 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // Package lostcancel defines an Analyzer that checks for failure to
6 // call a context cancellation function.
7 //
8 // # Analyzer lostcancel
9 //
10 // lostcancel: check cancel func returned by context.WithCancel is called
11 //
12 // The cancellation function returned by context.WithCancel, WithTimeout,
13 // WithDeadline and variants such as WithCancelCause must be called,
14 // or the new context will remain live until its parent context is cancelled.
15 // (The background context is never cancelled.)
16 package lostcancel