Skip to content

Commit b0c85a6

Browse files
BoYanZhcriyle
andauthored
grace: fix empty copyOut (#97)
* fix: remove empty copyOut * reserve capacity for copyOut --------- Co-authored-by: Yang Gao <[email protected]>
1 parent 01863bc commit b0c85a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/go-judge-shell/grpc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ func convertPBCopyIn(copyIn map[string]model.CmdFile) map[string]*pb.Request_Fil
181181
}
182182

183183
func convertPBCopyOut(copyOut []string) []*pb.Request_CmdCopyOutFile {
184-
rt := make([]*pb.Request_CmdCopyOutFile, len(copyOut))
184+
rt := make([]*pb.Request_CmdCopyOutFile, 0, len(copyOut))
185185
for _, n := range copyOut {
186186
optional := false
187187
if strings.HasSuffix(n, "?") {

0 commit comments

Comments
 (0)