chore: Dumb prealloc lint fix (#7430)

This commit is contained in:
Francis Lavoie
2026-01-13 14:13:43 -05:00
committed by GitHub
parent 28103aafba
commit 90972fbebc
8 changed files with 17 additions and 6 deletions

View File

@@ -761,7 +761,7 @@ type ServerBlock struct {
}
func (sb ServerBlock) GetKeysText() []string {
res := []string{}
res := make([]string, 0, len(sb.Keys))
for _, k := range sb.Keys {
res = append(res, k.Text)
}

View File

@@ -930,6 +930,7 @@ func parseLogHelper(h Helper, globalLogNames map[string]struct{}) ([]ConfigValue
// modifications to the parsing behavior.
parseAsGlobalOption := globalLogNames != nil
// nolint:prealloc
var configValues []ConfigValue
// Logic below expects that a name is always present when a