Default severity: note
Conservatively reports an empty slice followed by exactly one direct append per
iteration of a range with a useful len. Preallocating that capacity avoids
repeated growth while preserving zero length.
Bad
var result []Item
for _, item := range source {
result = append(result, convert(item))
}Good
result := make([]Item, 0, len(source))
for _, item := range source {
result = append(result, convert(item))
}