From 1df627aa3d61165eee743f83b4f72d79f6847424 Mon Sep 17 00:00:00 2001 From: Matteo Pologruto Date: Mon, 27 Mar 2023 15:00:54 +0200 Subject: [PATCH] Sort `board search` results with the same name using their platform ID --- commands/board/search.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/commands/board/search.go b/commands/board/search.go index 570c58ac510..dd881a39023 100644 --- a/commands/board/search.go +++ b/commands/board/search.go @@ -103,7 +103,10 @@ func Search(ctx context.Context, req *rpc.BoardSearchRequest) (*rpc.BoardSearchR } sort.Slice(res.Boards, func(i, j int) bool { - return res.Boards[i].Name < res.Boards[j].Name + if res.Boards[i].Name != res.Boards[j].Name { + return res.Boards[i].Name < res.Boards[j].Name + } + return res.Boards[i].Platform.Id < res.Boards[j].Platform.Id }) return res, nil }