Documentation
¶
Overview ¶
Package stringsconcatloop implements a Go analysis linter that flags string += concatenation inside for/range loop bodies, which allocates a new string on every iteration and can lead to O(n²) total allocated bytes. The idiomatic fix is to use strings.Builder.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Analyzer = &analysis.Analyzer{ Name: "stringsconcatloop", Doc: "reports string += concatenation inside for/range loops that should use strings.Builder", URL: "https://github.com/github/gh-aw/tree/main/pkg/linters/stringsconcatloop", Requires: []*analysis.Analyzer{inspect.Analyzer, nolint.Analyzer, filecheck.Analyzer}, Run: run, }
Analyzer is the string-concat-in-loop analysis pass.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.