diff options
| author | Joseph Richey <joerichey@google.com> | 2017-09-29 03:16:43 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-09-29 03:16:43 -0700 |
| commit | d6efd2ab463e82cc3a78860384f26d809bd76ce5 (patch) | |
| tree | f2fbf84f4e160d0d5e107ee05338be5e0133f01b /vendor/github.com/urfave/cli/command.go | |
| parent | 3ca15548454f773ea3290f810ed1b1d55fec1783 (diff) | |
| parent | ddcc450fc6d78806a0d0369bb1cdc2155f4e328e (diff) | |
Merge pull request #64 from google/new_values
Update all external dependencies to the latest version
Diffstat (limited to 'vendor/github.com/urfave/cli/command.go')
| -rw-r--r-- | vendor/github.com/urfave/cli/command.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/vendor/github.com/urfave/cli/command.go b/vendor/github.com/urfave/cli/command.go index 84946e7..23de294 100644 --- a/vendor/github.com/urfave/cli/command.go +++ b/vendor/github.com/urfave/cli/command.go @@ -59,6 +59,11 @@ type Command struct { // Full name of command for help, defaults to full command name, including parent commands. HelpName string commandNamePath []string + + // CustomHelpTemplate the text template for the command help topic. + // cli.go uses text/template to render templates. You can + // render custom help text by setting this variable. + CustomHelpTemplate string } type CommandsByName []Command @@ -192,8 +197,6 @@ func (c Command) Run(ctx *Context) (err error) { if c.Before != nil { err = c.Before(context) if err != nil { - fmt.Fprintln(context.App.Writer, err) - fmt.Fprintln(context.App.Writer) ShowCommandHelp(context, c.Name) HandleExitCoder(err) return err @@ -250,6 +253,7 @@ func (c Command) startApp(ctx *Context) error { // set CommandNotFound app.CommandNotFound = ctx.App.CommandNotFound + app.CustomAppHelpTemplate = c.CustomHelpTemplate // set the flags and commands app.Commands = c.Subcommands |