Help us shape the future of Go! Take the 2026 Go Developer Survey

timeafterleak

package
v0.92.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 10 Imported by: 0

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 = analyzerutil.New("timeafterleak", "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", run)

Analyzer is the time-after-leak analysis pass.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL