Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Analyzer = SCAnalyzer.Analyzer
View Source
var SCAnalyzer = lint.InitializeAnalyzer(&lint.Analyzer{ Analyzer: &analysis.Analyzer{ Name: "S1029", Run: sharedcheck.CheckRangeStringRunes, Requires: []*analysis.Analyzer{buildir.Analyzer}, }, Doc: &lint.RawDocumentation{ Title: `Range over the string directly`, Text: `Ranging over a string will yield byte offsets and runes. If the offset isn't used, this is functionally equivalent to converting the string to a slice of runes and ranging over that. Ranging directly over the string will be more performant, however, as it avoids allocating a new slice, the size of which depends on the length of the string.`, Before: `for _, r := range []rune(s) {}`, After: `for _, r := range s {}`, Since: "2017.1", MergeIf: lint.MergeIfAny, }, })
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.