urfave / cli

A simple, fast, and fun package for building command line apps in Go

Home Page:https://cli.urfave.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bug report: `cli.CommandsByName` not exist in v3-alpha4

Passer6y opened this issue · comments

Checklist

What problem does this solve?

I want to following code to sort cli command, it works in v2, but not exist in v3-alpha4

sort.Sort(cli.CommandsByName(cli.Commands))

Solution description

Describe alternatives you've considered

@Passer6y You can do

rootCommand := Command{...}
sort.Sort(rootCommand.Commands)