Skip to content

Commit

Permalink
Merge pull request docker#5730 from thelovekesh/update/help-template
Browse files Browse the repository at this point in the history
Remove preceding white space from cobra help template
  • Loading branch information
thaJeztah authored Feb 10, 2025
2 parents f7c3d1c + 61a3b4b commit e6ee7ea
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion cli/cobra.go
Original file line number Diff line number Diff line change
Expand Up @@ -518,4 +518,4 @@ Run '{{.CommandPath}} COMMAND --help' for more information on a command.
`

const helpTemplate = `
{{if or .Runnable .HasSubCommands}}{{.UsageString}}{{end}}`
{{- if or .Runnable .HasSubCommands}}{{.UsageString}}{{end}}`
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Usage: docker helloworld goodbye

Say Goodbye instead of Hello
1 change: 0 additions & 1 deletion e2e/cli-plugins/testdata/docker-help-helloworld.golden
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Usage: docker helloworld [OPTIONS] COMMAND

A basic Hello World plugin for tests
Expand Down
1 change: 0 additions & 1 deletion e2e/stack/testdata/stack-deploy-help.golden
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Usage: docker stack deploy [OPTIONS] STACK

Deploy a new stack or update an existing stack
Expand Down

0 comments on commit e6ee7ea

Please sign in to comment.