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.
Click to show internal directories.
Click to hide internal directories.