Enable prealloc linter

This will give us nice little performance gains in some code paths.

Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
This commit is contained in:
Milos Gajdos
2023-09-03 22:41:51 +01:00
parent a2e65220ae
commit 59fd8656ac
10 changed files with 20 additions and 12 deletions

View File

@@ -416,7 +416,7 @@ func directDescendants(blobs []string, prefix string) []string {
}
}
var keys []string
keys := make([]string, 0, len(out))
for k := range out {
keys = append(keys, k)
}