diff options
| author | Alex Flint <[email protected]> | 2021-09-18 08:57:29 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-09-18 08:57:29 -0700 |
| commit | a4afd6a8490903fdc93b319be0d54bd2039c3f08 (patch) | |
| tree | 8441653724d058566ba492200900a5c6cca84d17 /parse.go | |
| parent | 66cb696e79be30bc979cb003ef8bdecc78266ced (diff) | |
| parent | f2f876420ce7c64673cdf97ed8071db8ef46e5f2 (diff) | |
Merge pull request #156 from alexflint/usage-for-subcommands
add FailSubcommand, WriteUsageForSubcommand, WriteHelpForSubcommand
Diffstat (limited to 'parse.go')
| -rw-r--r-- | parse.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -85,13 +85,13 @@ func MustParse(dest ...interface{}) *Parser { err = p.Parse(flags()) switch { case err == ErrHelp: - p.writeHelpForCommand(stdout, p.lastCmd) + p.writeHelpForSubcommand(stdout, p.lastCmd) osExit(0) case err == ErrVersion: fmt.Fprintln(stdout, p.version) osExit(0) case err != nil: - p.failWithCommand(err.Error(), p.lastCmd) + p.failWithSubcommand(err.Error(), p.lastCmd) } return p |
