Add support for ExtraInfo.

This commit is contained in:
Harshavardhana
2016-11-25 01:07:42 -08:00
parent f7d6a07f2d
commit baa33cb888
2 changed files with 26 additions and 2 deletions

2
app.go
View File

@@ -85,6 +85,8 @@ type App struct {
ErrWriter io.Writer
// Other custom info
Metadata map[string]interface{}
// Carries a function which returns app specific info.
ExtraInfo func() map[string]string
// 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.