From ca453104f6ebde6aebc288965a056186fc27d429 Mon Sep 17 00:00:00 2001 From: cui fliter Date: Fri, 4 Oct 2024 19:58:54 +0800 Subject: [PATCH] fix: fix slice init length --- agent/runcommand/mds/service.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agent/runcommand/mds/service.go b/agent/runcommand/mds/service.go index 91964e69c..b126e6fb5 100644 --- a/agent/runcommand/mds/service.go +++ b/agent/runcommand/mds/service.go @@ -118,12 +118,12 @@ func NewService(context context.T, connectionTimeout time.Duration) Service { msgSvc := ssmmds.New(sess) //adding server based expected error messages - serverBasedErrorMessages = make([]string, 2) + serverBasedErrorMessages = make([]string, 0, 2) serverBasedErrorMessages = append(serverBasedErrorMessages, "use of closed network connection") serverBasedErrorMessages = append(serverBasedErrorMessages, "connection reset by peer") //adding client based expected error messages - clientBasedErrorMessages = make([]string, 1) + clientBasedErrorMessages = make([]string, 0, 1) clientBasedErrorMessages = append(clientBasedErrorMessages, "Client.Timeout exceeded while awaiting headers") sendMdsSdkRequest := func(req *request.Request) error {