From ac81eea671ac01bc986ad7bff6744b27d455e252 Mon Sep 17 00:00:00 2001 From: Wen Cheng Ma Date: Thu, 3 Dec 2015 15:16:53 +0800 Subject: [PATCH] Improvement for docker subcommand's help messages Signed-off-by: Wen Cheng Ma --- mflag/flag.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mflag/flag.go b/mflag/flag.go index ddcd62c..ac3cfc1 100644 --- a/mflag/flag.go +++ b/mflag/flag.go @@ -571,10 +571,7 @@ func (fs *FlagSet) PrintDefaults() { format := " -%s=%s" fmt.Fprintf(writer, format, strings.Join(names, ", -"), val) } - for i, line := range strings.Split(flag.Usage, "\n") { - if i != 0 { - line = " " + line - } + for _, line := range strings.Split(flag.Usage, "\n") { fmt.Fprintln(writer, "\t", line) } }