fix "prealloc" linting

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn committed 2026-02-12 18:28:58 +01:00
1 parent 775d3734eb
commit f18b8d707e
3 files changed
+4 -5

No files matched your search

+2 -3
View File
@@ -127,9 +127,6 @@ func checkTestRepository(t *testing.T, repository distribution.Repository, remov
configDgst := digest.FromBytes(config)
configReader := bytes.NewReader(config)
var blobDigests []digest.Digest
blobDigests = append(blobDigests, configDgst)
blobs := repository.Blobs(ctx)
// push config blob
@@ -153,6 +150,8 @@ func checkTestRepository(t *testing.T, repository distribution.Repository, remov
},
}
blobDigests := make([]digest.Digest, 0, 3)
blobDigests = append(blobDigests, configDgst)
for range 2 {
rs, dgst, err := testutil.CreateRandomTarFile()
if err != nil {
+1 -1
View File
@@ -1051,7 +1051,7 @@ func TestListObjectsV2(t *testing.T) {
ctx := dcontext.Background()
n := 6
prefix := "/test-list-objects-v2"
var filePaths []string
filePaths := make([]string, 0, n)
for i := range n {
filePaths = append(filePaths, fmt.Sprintf("%s/%d", prefix, i))
}
+1 -1
View File
@@ -21,7 +21,7 @@ func TestLinkedBlobStoreEnumerator(t *testing.T) {
fooEnv := newManifestStoreTestEnv(t, fooRepoName, "thetag")
ctx := context.Background()
var expected []string
expected := make([]string, 0, 2)
for range 2 {
rs, dgst, err := testutil.CreateRandomTarFile()
if err != nil {