mirror of https://github.com/spf13/cobra.git
trim trailing whitespace
This commit is contained in:
parent
4b86c66ef2
commit
5f83d08ae0
|
@ -248,8 +248,7 @@ func (c *Command) UsageTemplate() string {
|
|||
if c.HasParent() {
|
||||
return c.parent.UsageTemplate()
|
||||
} else {
|
||||
return `{{ $cmd := . }}
|
||||
Usage: {{if .Runnable}}
|
||||
return `{{ $cmd := . }}Usage:{{if .Runnable}}
|
||||
{{.UseLine}}{{if .HasFlags}} [flags]{{end}}{{end}}{{if .HasSubCommands}}
|
||||
{{ .CommandPath}} [command]{{end}}{{if gt .Aliases 0}}
|
||||
|
||||
|
@ -286,8 +285,7 @@ func (c *Command) HelpTemplate() string {
|
|||
return c.parent.HelpTemplate()
|
||||
} else {
|
||||
return `{{with or .Long .Short }}{{. | trim}}{{end}}
|
||||
{{if or .Runnable .HasSubCommands}}{{.UsageString}}{{end}}
|
||||
`
|
||||
{{if or .Runnable .HasSubCommands}}{{.UsageString}}{{end}}`
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue