From 4c7112283e38a9e6d77cf66ec2a2c1c9450defbc Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Mon, 7 Nov 2022 21:41:09 -0500 Subject: [PATCH] Fix misallocated slice (#120) --- pkg/gcrcleaner/cleaner.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/gcrcleaner/cleaner.go b/pkg/gcrcleaner/cleaner.go index 69e2aff..6a8a5bc 100644 --- a/pkg/gcrcleaner/cleaner.go +++ b/pkg/gcrcleaner/cleaner.go @@ -115,7 +115,7 @@ func (c *Cleaner) Clean(ctx context.Context, repo string, since time.Time, keep }) // Generate an ordered map - manifestListForLog := make([]map[string]any, len(manifests)) + manifestListForLog := make([]map[string]any, 0, len(manifests)) for _, m := range manifests { manifestListForLog = append(manifestListForLog, map[string]any{ "repo": m.Repo,