From a71a24c0f4bd3f4f152ff1a0b7c6bc400d0cc01e Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Thu, 31 Aug 2023 12:24:02 +0800 Subject: [PATCH] chore: slice loop replace Signed-off-by: guoguangwu --- controller/remote/server.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/controller/remote/server.go b/controller/remote/server.go index a39fea51..10bfd890 100644 --- a/controller/remote/server.go +++ b/controller/remote/server.go @@ -57,9 +57,7 @@ func (m *Server) ListProcesses(ctx context.Context, req *pb.ListProcessesRequest return nil, errors.Errorf("unknown ref %q", req.Ref) } res = new(pb.ListProcessesResponse) - for _, p := range s.processes.ListProcesses() { - res.Infos = append(res.Infos, p) - } + res.Infos = append(res.Infos, s.processes.ListProcesses()...) return res, nil }