feat: by default show help if use do nothing
parent
284811f7f4
commit
fffbb832be
5
main.go
5
main.go
|
@ -108,6 +108,11 @@ type action struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *action) Run(c *cli.Context) error {
|
func (a *action) Run(c *cli.Context) error {
|
||||||
|
// Show help if there is nothing
|
||||||
|
if c.NArg() == 0 && c.NumFlags() == 0 {
|
||||||
|
return cli.ShowAppHelp(c)
|
||||||
|
}
|
||||||
|
|
||||||
// Set up
|
// Set up
|
||||||
a.getFlags(c)
|
a.getFlags(c)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue