Skip to content

Commit e6ee7ea

Browse files
authored
Merge pull request #5730 from thelovekesh/update/help-template
Remove preceding white space from cobra help template
2 parents f7c3d1c + 61a3b4b commit e6ee7ea

File tree

4 files changed

+1
-4
lines changed

4 files changed

+1
-4
lines changed

cli/cobra.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -518,4 +518,4 @@ Run '{{.CommandPath}} COMMAND --help' for more information on a command.
518518
`
519519

520520
const helpTemplate = `
521-
{{if or .Runnable .HasSubCommands}}{{.UsageString}}{{end}}`
521+
{{- if or .Runnable .HasSubCommands}}{{.UsageString}}{{end}}`
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
Usage: docker helloworld goodbye
32

43
Say Goodbye instead of Hello

e2e/cli-plugins/testdata/docker-help-helloworld.golden

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
Usage: docker helloworld [OPTIONS] COMMAND
32

43
A basic Hello World plugin for tests

e2e/stack/testdata/stack-deploy-help.golden

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
Usage: docker stack deploy [OPTIONS] STACK
32

43
Deploy a new stack or update an existing stack

0 commit comments

Comments
 (0)