mapclearloop

package
v0.82.12 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package mapclearloop implements a Go analysis linter that flags range-over-map loops whose only body statement is delete(m, k), which should be replaced by the built-in clear(m) introduced in Go 1.21.

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name:     "mapclearloop",
	Doc:      "reports range-over-map loops that delete every entry and can be replaced with clear(m)",
	URL:      "https://github.com/github/gh-aw/tree/main/pkg/linters/mapclearloop",
	Requires: []*analysis.Analyzer{inspect.Analyzer, nolint.Analyzer, filecheck.Analyzer},
	Run:      run,
}

Analyzer is the map-clear-loop 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