chore: update comment

main
sudo pacman -Syu 2022-11-25 00:40:00 +07:00
parent 90e0bb0a6b
commit 6b8625be56
No known key found for this signature in database
GPG Key ID: D6CB5C6C567C47B0
2 changed files with 6 additions and 0 deletions

View File

@ -35,6 +35,11 @@ func (a *action) Run(c *cli.Context) error {
return a.RunHelp(c) return a.RunHelp(c)
} }
// Empty args
if c.Args().Len() == 0 {
return a.RunHelp(c)
}
f := imports.NewFormmater( f := imports.NewFormmater(
imports.FormatterWithList(a.flags.list), imports.FormatterWithList(a.flags.list),
imports.FormatterWithWrite(a.flags.write), imports.FormatterWithWrite(a.flags.write),

View File

@ -35,6 +35,7 @@ type App struct {
func NewApp() *App { func NewApp() *App {
a := &action{} a := &action{}
// TODO: hide commands, show args usage
cliApp := &cli.App{ cliApp := &cli.App{
Name: name, Name: name,
Usage: usage, Usage: usage,