mirror of
https://github.com/scratchfoundation/golangci-lint.git
synced 2025-07-13 05:04:13 -04:00
11 lines
214 B
Go
11 lines
214 B
Go
//golangcitest:args -Eprealloc
|
|
package testdata
|
|
|
|
func Prealloc(source []int) []int {
|
|
var dest []int // want "Consider pre-allocating `dest`"
|
|
for _, v := range source {
|
|
dest = append(dest, v)
|
|
}
|
|
|
|
return dest
|
|
}
|