Documentation
¶
Overview ¶
Package timeafterleak implements a Go analysis linter that flags time.After calls used as select case channel receives inside loops, which allocate a new timer on every iteration that is not garbage collected until it fires when another case is selected first.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Analyzer = &analysis.Analyzer{ Name: "timeafterleak", Doc: "reports time.After calls used as the channel-receive expression in a select CommClause that is enclosed by a for or range loop; does not flag receives inside case bodies, single-case selects without a default, or selects enclosed only by a function literal boundary", URL: "https://github.com/github/gh-aw/tree/main/pkg/linters/timeafterleak", Requires: []*analysis.Analyzer{inspect.Analyzer}, Run: run, }
Analyzer is the time-after-leak analysis pass.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.