feat: sort collection nodes by name in final output
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"math"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"sort"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
@@ -153,6 +154,11 @@ func loadProxyNodes(ctx context.Context, opts BuildOptions) ([]model.ProxyNode,
|
||||
// Ensure unique names
|
||||
allProxies = proxy.EnsureUniqueProxyNames(allProxies)
|
||||
|
||||
// Sort by node name for consistent output
|
||||
sort.Slice(allProxies, func(i, j int) bool {
|
||||
return fmt.Sprintf("%v", allProxies[i]["name"]) < fmt.Sprintf("%v", allProxies[j]["name"])
|
||||
})
|
||||
|
||||
// Select response metadata
|
||||
metadataMap := make(map[string]model.SubscriptionResponseMetadata, len(enabledSources))
|
||||
for i, s := range enabledSources {
|
||||
|
||||
Reference in New Issue
Block a user