From 4a77e784f04b9a3bdd8b4eeaa3d3278853c46810 Mon Sep 17 00:00:00 2001 From: bytetigers Date: Thu, 22 Aug 2024 11:21:13 +0800 Subject: [PATCH] fix: fix slice init length Signed-off-by: bytetigers --- agent/hcp/bootstrap/testing.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/hcp/bootstrap/testing.go b/agent/hcp/bootstrap/testing.go index f073d1718344..b7b5c6cb86ac 100644 --- a/agent/hcp/bootstrap/testing.go +++ b/agent/hcp/bootstrap/testing.go @@ -176,7 +176,7 @@ func generateClusterData(cluster resource.Resource) (gnmmod.HashicorpCloudGlobal } func mapArgsString(m map[string]string) string { - args := make([]string, len(m)) + args := make([]string, 0, len(m)) for k, v := range m { args = append(args, fmt.Sprintf("%s=%s", k, v)) }