package s1001
import "honnef.co/go/tools/simple/s1001"
Index ¶
Variables ¶
var Analyzer = SCAnalyzer.Analyzer
var SCAnalyzer = lint.InitializeAnalyzer(&lint.Analyzer{ Analyzer: &analysis.Analyzer{ Name: "S1001", Run: run, Requires: []*analysis.Analyzer{inspect.Analyzer, generated.Analyzer}, }, Doc: &lint.RawDocumentation{ Title: `Replace for loop with call to copy`, Text: ` Use \'copy()\' for copying elements from one slice to another. For arrays of identical size, you can use simple assignment.`, Before: ` for i, x := range src { dst[i] = x }`, After: `copy(dst, src)`, Since: "2017.1", MergeIf: lint.MergeIfAll, }, })
Source Files ¶
s1001.go
- Version
- v0.6.1 (latest)
- Published
- Mar 5, 2025
- Platform
- js/wasm
- Imports
- 12 packages
- Last checked
- 3 hours ago –
Tools for package owners.