func ShowAppHelp(c *Context) error {
	template := c.App.CustomAppHelpTemplate
	if template == "" {
		template = AppHelpTemplate
	}
	if c.App.ExtraInfo == nil {
		HelpPrinter(c.App.Writer, template, c.App)
		return nil
	}
	customAppData := func() map[string]interface{} {
		return map[string]interface{}{
			"ExtraInfo": c.App.ExtraInfo,
		}
	}
	HelpPrinterCustom(c.App.Writer, template, c.App, customAppData())
	return nil
}
ShowAppHelp is an action that displays the help.
package cli
import (
	"fmt"
	"io"
	"os"
	"strings"
	"text/tabwriter"
	"text/template"
	"unicode/utf8"
)
var helpCommand = &Command{
	Name:      "help",
	Aliases:   []string{"h"},
	Usage:     "Shows a list of commands or help for one command",
	ArgsUsage: "[command]",
	Action: func(c *Context) error {
		args := c.Args()
		if args.Present() {
			return ShowCommandHelp(c, args.First())
		}
		_ = ShowAppHelp(c)
		return nil
	},
}
var helpSubcommand = &Command{
	Name:      "help",
	Aliases:   []string{"h"},
	Usage:     "Shows a list of commands or help for one command",
	ArgsUsage: "[command]",
	Action: func(c *Context) error {
		args := c.Args()
		if args.Present() {
			return ShowCommandHelp(c, args.First())
		}
		return ShowSubcommandHelp(c)
	},
}
type helpPrinter func(w io.Writer, templ string, data interface{})
type helpPrinterCustom func(w io.Writer, templ string, data interface{}, customFunc map[string]interface{})
var HelpPrinter helpPrinter = printHelp
var HelpPrinterCustom helpPrinterCustom = printHelpCustom
var VersionPrinter = printVersion
func ShowAppHelpAndExit(c *Context, exitCode int) {
	_ = ShowAppHelp(c)
	os.Exit(exitCode)
}