chore: reserve capacity for copyOut

This commit is contained in:
张泊明518370910136 2024-03-04 02:16:05 -05:00
parent 6e2d37d7e5
commit f39f71bad5
GPG Key ID: D47306D7062CDA9D

View File

@ -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, "?") {