diff --git a/cmd/crictl/main.go b/cmd/crictl/main.go index fce4dee4f8..c797d757d8 100644 --- a/cmd/crictl/main.go +++ b/cmd/crictl/main.go @@ -22,7 +22,9 @@ import ( "fmt" "os" "runtime" + "slices" "sort" + "strings" "time" "github.com/sirupsen/logrus" @@ -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.",