From f39f71bad5d6eeec2f4e00227c5982f20a380611 Mon Sep 17 00:00:00 2001 From: Boming Zhang Date: Mon, 4 Mar 2024 02:16:05 -0500 Subject: [PATCH] chore: reserve capacity for copyOut --- internal/executors/sandbox/convert.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/executors/sandbox/convert.go b/internal/executors/sandbox/convert.go index 6b9750c..64c29c4 100644 --- a/internal/executors/sandbox/convert.go +++ b/internal/executors/sandbox/convert.go @@ -48,7 +48,7 @@ func convertPBCopyIn(copyIn map[string]stage.CmdFile) map[string]*pb.Request_Fil } func convertPBCopyOut(copyOut []string) []*pb.Request_CmdCopyOutFile { - rt := make([]*pb.Request_CmdCopyOutFile, 0) + rt := make([]*pb.Request_CmdCopyOutFile, 0, len(copyOut)) for _, n := range copyOut { optional := false if strings.HasSuffix(n, "?") {