chore: slice loop replace

Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
This commit is contained in:
guoguangwu 2023-08-31 12:24:02 +08:00
parent 76119b0f61
commit a71a24c0f4
1 changed files with 1 additions and 3 deletions

View File

@ -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
}