From 61a3b4bd503339b8add2b74ad0e9d92579a3efc5 Mon Sep 17 00:00:00 2001 From: thelovekesh Date: Wed, 8 Jan 2025 21:38:01 +0530 Subject: [PATCH] Remove preceding white space from cobra help template Signed-off-by: thelovekesh Signed-off-by: Lovekesh Kumar --- cli/cobra.go | 2 +- e2e/cli-plugins/testdata/docker-help-helloworld-goodbye.golden | 1 - e2e/cli-plugins/testdata/docker-help-helloworld.golden | 1 - e2e/stack/testdata/stack-deploy-help.golden | 1 - 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/cli/cobra.go b/cli/cobra.go index feab2b4a91c8..e6bcc90fa1ef 100644 --- a/cli/cobra.go +++ b/cli/cobra.go @@ -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}}` diff --git a/e2e/cli-plugins/testdata/docker-help-helloworld-goodbye.golden b/e2e/cli-plugins/testdata/docker-help-helloworld-goodbye.golden index b683120cf374..fb8cccd564c1 100644 --- a/e2e/cli-plugins/testdata/docker-help-helloworld-goodbye.golden +++ b/e2e/cli-plugins/testdata/docker-help-helloworld-goodbye.golden @@ -1,4 +1,3 @@ - Usage: docker helloworld goodbye Say Goodbye instead of Hello diff --git a/e2e/cli-plugins/testdata/docker-help-helloworld.golden b/e2e/cli-plugins/testdata/docker-help-helloworld.golden index bea200b1425c..e06dda3b0e9f 100644 --- a/e2e/cli-plugins/testdata/docker-help-helloworld.golden +++ b/e2e/cli-plugins/testdata/docker-help-helloworld.golden @@ -1,4 +1,3 @@ - Usage: docker helloworld [OPTIONS] COMMAND A basic Hello World plugin for tests diff --git a/e2e/stack/testdata/stack-deploy-help.golden b/e2e/stack/testdata/stack-deploy-help.golden index 3ebe9299f3f1..91e9c8300a5d 100644 --- a/e2e/stack/testdata/stack-deploy-help.golden +++ b/e2e/stack/testdata/stack-deploy-help.golden @@ -1,4 +1,3 @@ - Usage: docker stack deploy [OPTIONS] STACK Deploy a new stack or update an existing stack