feat(help): add ShowSubcommandHelpAndExit

This commit is contained in:
knqyf263 2020-09-08 17:53:16 +03:00
parent d2d2098085
commit 74af85a00d

View File

@ -214,6 +214,12 @@ func ShowCommandHelp(ctx *Context, command string) error {
return nil
}
// ShowSubcommandHelpAndExit - Prints help for the given subcommand and exits with exit code.
func ShowSubcommandHelpAndExit(c *Context, exitCode int) {
_ = ShowSubcommandHelp(c)
os.Exit(exitCode)
}
// ShowSubcommandHelp prints help for the given subcommand
func ShowSubcommandHelp(c *Context) error {
if c == nil {