From 3a05f2f2d454423f2d53d80a308ac97c40844e05 Mon Sep 17 00:00:00 2001 From: "Jose R. Gonzalez" Date: Wed, 10 Sep 2025 15:58:17 -0500 Subject: [PATCH] Ensure slice length preallocation is correct Signed-off-by: Jose R. Gonzalez --- internal/catalogapi/catalogapi.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/catalogapi/catalogapi.go b/internal/catalogapi/catalogapi.go index 65ea928..d0ec35a 100644 --- a/internal/catalogapi/catalogapi.go +++ b/internal/catalogapi/catalogapi.go @@ -261,7 +261,7 @@ func PopulateProduct( return nil, err } - attachedIDs := make([]string, len(associatedComponents)) + attachedIDs := make([]string, 0, len(associatedComponents)) newListing.With.Components = make([]*resource.Component, 0, len(associatedComponents)) for _, v := range associatedComponents { attachedIDs = append(attachedIDs, v.Id) @@ -281,7 +281,6 @@ func PopulateProduct( slices.Sort(attachedIDs) slices.Sort(newListing.Spec.CertProjects) - L.Info("foo") if !slices.Equal(attachedIDs, newListing.Spec.CertProjects) { L.Debug("product listing has attached components that are not marked as active.") L.Debug(