Skip to content

Commit

Permalink
improve readability
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Sabsay <[email protected]>
  • Loading branch information
Daniel Sabsay committed Jan 23, 2025
1 parent 09711f7 commit 28860c7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/ring/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -479,13 +479,13 @@ func (d *Desc) Clone() interface{} {
func (d *Desc) getTokensInfo() map[uint32]instanceInfo {
out := map[uint32]instanceInfo{}

keys := []string{}
for key, _ := range d.Ingesters {
keys = append(keys, key)
instanceIDs := []string{}
for key := range d.Ingesters {
instanceIDs = append(instanceIDs, key)
}
sort.Strings(keys)
sort.Strings(instanceIDs)

for _, instanceID := range keys {
for _, instanceID := range instanceIDs {
instance := d.Ingesters[instanceID]
info := instanceInfo{
InstanceID: instanceID,
Expand Down

0 comments on commit 28860c7

Please sign in to comment.