diff options
| author | Joseph Richey <joerichey94@gmail.com> | 2017-09-29 02:08:56 -0700 |
|---|---|---|
| committer | Joseph Richey <joerichey94@gmail.com> | 2017-09-29 02:33:45 -0700 |
| commit | 05911d5503434a802c6dc9909a74cc76c2bf6661 (patch) | |
| tree | e1e7aa0ba09dcc4b4c56b28429d1f6f288bba03b /vendor/github.com/urfave/cli/command.go | |
| parent | a949b13dac670014c37c7181e368b9c0c7a7f0f5 (diff) | |
vendor: Update to latest versions
This changes the vendored sources of github.com/golang/protobuf,
golang.org/x/crypto/ssh, and golang.org/x/sys/unix to be the current
master versions.
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 |