Skip to content
Myr

No leading newline if Short and Long both unset

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Before --help would start ``` Usage: command [flags] [...] ``` After --help will show ``` Usage: command [flags] [...] ```

authored by Eric Paris · committed by Eric Paris · parent 42498ec · Browse files · 1 file+3 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−2 removed

  • other:+3 added−2 removed

1 file+3 added−2 removed

modified:command.go+3 added-2 removed
282 unmodified lines
283284 if c.HasParent() {285 return c.parent.HelpTemplate()286 } else {287 return `{{with or .Long .Short }}{{. | trim}}{{end}}288{{if or .Runnable .HasSubCommands}}{{.UsageString}}{{end}}`287 return `{{with or .Long .Short }}{{. | trim}}288289{{end}}{{if or .Runnable .HasSubCommands}}{{.UsageString}}{{end}}`290 }291}292293// Really only used when casting a command to a commander
815 unmodified lines