mirror of
https://github.com/spf13/cobra
synced 2024-11-24 14:47:12 +00:00
Merge pull request #153 from eparis/remove-useless-assignment
UsageTemple: remove useless variable assignment
This commit is contained in:
commit
eeec8e3ce3
1 changed files with 1 additions and 1 deletions
|
@ -251,7 +251,7 @@ func (c *Command) UsageTemplate() string {
|
||||||
if c.HasParent() {
|
if c.HasParent() {
|
||||||
return c.parent.UsageTemplate()
|
return c.parent.UsageTemplate()
|
||||||
} else {
|
} else {
|
||||||
return `{{ $cmd := . }}Usage:{{if .Runnable}}
|
return `Usage:{{if .Runnable}}
|
||||||
{{.UseLine}}{{if .HasFlags}} [flags]{{end}}{{end}}{{if .HasSubCommands}}
|
{{.UseLine}}{{if .HasFlags}} [flags]{{end}}{{end}}{{if .HasSubCommands}}
|
||||||
{{ .CommandPath}} [command]{{end}}{{if gt .Aliases 0}}
|
{{ .CommandPath}} [command]{{end}}{{if gt .Aliases 0}}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue