Decouple help printer for custom templates

main
Robert Liebowitz 5 years ago
parent a221e662f1
commit e2a8dfe314

@ -187,7 +187,7 @@ func ShowCommandHelp(ctx *Context, command string) error {
for _, c := range ctx.App.Commands {
if c.HasName(command) {
if c.CustomHelpTemplate != "" {
HelpPrinterCustom(ctx.App.Writer, c.CustomHelpTemplate, c, nil)
HelpPrinter(ctx.App.Writer, c.CustomHelpTemplate, c)
} else {
HelpPrinter(ctx.App.Writer, CommandHelpTemplate, c)
}
@ -261,7 +261,7 @@ func printHelpCustom(out io.Writer, templ string, data interface{}, customFunc m
}
func printHelp(out io.Writer, templ string, data interface{}) {
printHelpCustom(out, templ, data, nil)
HelpPrinterCustom(out, templ, data, nil)
}
func checkVersion(c *Context) bool {

Loading…
Cancel
Save