aboutsummaryrefslogtreecommitdiff
path: root/weed/topology/data_center.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/topology/data_center.go')
-rw-r--r--weed/topology/data_center.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/weed/topology/data_center.go b/weed/topology/data_center.go
index 55b17e911..26d2de7d3 100644
--- a/weed/topology/data_center.go
+++ b/weed/topology/data_center.go
@@ -3,7 +3,6 @@ package topology
import (
"github.com/seaweedfs/seaweedfs/weed/pb/master_pb"
"golang.org/x/exp/slices"
- "strings"
)
type DataCenter struct {
@@ -47,8 +46,8 @@ func (dc *DataCenter) ToInfo() (info DataCenterInfo) {
racks = append(racks, rack.ToInfo())
}
- slices.SortFunc(racks, func(a, b RackInfo) int {
- return strings.Compare(string(a.Id), string(b.Id))
+ slices.SortFunc(racks, func(a, b RackInfo) bool {
+ return a.Id < b.Id
})
info.Racks = racks
return