Skip to content

Commit

Permalink
sort result 2
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Vaillancourt <[email protected]>
  • Loading branch information
timvaillancourt committed Jan 15, 2025
1 parent 14ce279 commit 9cfc222
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions go/vt/vtorc/logic/tablet_discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,10 @@ func getKeyspaceShardsToWatch() ([]*topo.KeyspaceShard, error) {
}

slices.SortStableFunc(keyspaceShards, func(a, b *topo.KeyspaceShard) int {
ksStrA := topoproto.KeyspaceShardString(a.Keyspace, a.Shard)
ksStrB := topoproto.KeyspaceShardString(b.Keyspace, b.Shard)
return strings.Compare(ksStrA, ksStrB)
return strings.Compare(
topoproto.KeyspaceShardString(a.Keyspace, a.Shard),
topoproto.KeyspaceShardString(b.Keyspace, b.Shard),
)
})

return keyspaceShards, nil
Expand Down

0 comments on commit 9cfc222

Please sign in to comment.