Skip to content

Commit

Permalink
rpk: sort available tuners list.
Browse files Browse the repository at this point in the history
It's used in help texts and we want them to be
always the same.
  • Loading branch information
r-vasquez committed Dec 12, 2023
1 parent 80e0fa5 commit 088b1de
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/go/rpk/pkg/tuners/factory/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ package factory

import (
"runtime"
"sort"
"time"

"github.com/redpanda-data/redpanda/src/go/rpk/pkg/cloud/gcp"
Expand Down Expand Up @@ -120,6 +121,7 @@ func AvailableTuners() []string {
for key := range allTuners {
keys = append(keys, key)
}
sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] })
return keys
}

Expand Down

0 comments on commit 088b1de

Please sign in to comment.