lostcancel
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package lostcancel defines an Analyzer that checks for failure tocall a context cancellation function.
Analyzer lostcancel¶
lostcancel: check cancel func returned by context.WithCancel is called
The cancellation function returned by context.WithCancel, WithTimeout,WithDeadline and variants such as WithCancelCause must be called,or the new context will remain live until its parent context is cancelled.(The background context is never cancelled.)
Index¶
Constants¶
This section is empty.
Variables¶
var Analyzer = &analysis.Analyzer{Name: "lostcancel",Doc:analysisutil.MustExtractDoc(doc, "lostcancel"),URL: "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/lostcancel",Run: run,Requires: []*analysis.Analyzer{inspect.Analyzer,ctrlflow.Analyzer,},}
Functions¶
This section is empty.
Types¶
This section is empty.
Directories¶
Path | Synopsis |
---|---|
cmd | |
lostcancelcommand The lostcancel command applies the golang.org/x/tools/go/analysis/passes/lostcancel analysis to the specified packages of Go source code. | The lostcancel command applies the golang.org/x/tools/go/analysis/passes/lostcancel analysis to the specified packages of Go source code. |