Add support for custom help templates.

This commit is contained in:
Harshavardhana
2016-11-25 00:16:48 -08:00
parent d70f47eeca
commit f7d6a07f2d
4 changed files with 47 additions and 3 deletions

4
app.go
View File

@@ -85,6 +85,10 @@ type App struct {
ErrWriter io.Writer
// Other custom info
Metadata map[string]interface{}
// CustomAppHelpTemplate the text template for app help topic.
// cli.go uses text/template to render templates. You can
// render custom help text by setting this variable.
CustomAppHelpTemplate string
didSetup bool
}