api: sort path readers (#5691)

This commit is contained in:
Alessandro Ros
2026-04-25 10:20:02 +02:00
committed by GitHub
parent 57671a3913
commit 68821502ce
+9
View File
@@ -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
}(),
},