From 68821502cec053d8208a01100bf2a30cd04d2eba Mon Sep 17 00:00:00 2001 From: Alessandro Ros Date: Sat, 25 Apr 2026 10:20:02 +0200 Subject: [PATCH] api: sort path readers (#5691) --- internal/core/path.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/internal/core/path.go b/internal/core/path.go index f7d7e9f9..8d9ae7e9 100644 --- a/internal/core/path.go +++ b/internal/core/path.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "net" + "sort" "strconv" "sync" "sync/atomic" @@ -704,6 +705,14 @@ func (pa *path) doAPIPathsGet(req pathAPIPathsGetReq) { ret[i] = *r.APIReaderDescribe() i++ } + + sort.Slice(ret, func(i, j int) bool { + if ret[i].Type != ret[j].Type { + return ret[i].Type < ret[j].Type + } + return ret[i].ID < ret[j].ID + }) + return ret }(), },