feat: flag action

This commit is contained in:
Wendell Sun
2022-02-15 23:49:41 +08:00
parent 880a802dc8
commit 14366f7030
19 changed files with 257 additions and 0 deletions

View File

@@ -165,6 +165,10 @@ func (c *Command) Run(ctx *Context) (err error) {
}
}
if err = runFlagActions(cCtx, c.Flags); err != nil {
return err
}
if c.Action == nil {
c.Action = helpSubcommand.Action
}