Skip to content

Commit

Permalink
Merge pull request #1474 from saschagrunert/sort-commands
Browse files Browse the repository at this point in the history
Sort commands by their name
  • Loading branch information
k8s-ci-robot authored Jul 8, 2024
2 parents f241de8 + d898927 commit 19b2c5a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/crictl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ import (
"fmt"
"os"
"runtime"
"slices"
"sort"
"strings"
"time"

"github.com/sirupsen/logrus"
Expand Down Expand Up @@ -210,6 +212,8 @@ func main() {
eventsCommand,
}

slices.SortFunc(app.Commands, func(a, b *cli.Command) int { return strings.Compare(a.Name, b.Name) })

runtimeEndpointUsage := fmt.Sprintf("Endpoint of CRI container runtime "+
"service (default: uses in order the first successful one of %v). "+
"Default is now deprecated and the endpoint should be set instead.",
Expand Down

0 comments on commit 19b2c5a

Please sign in to comment.