Remove extra 3 spaces in last line

This commit is contained in:
Naveen Gogineni 2022-10-05 14:40:59 -04:00
parent d5a1252ef3
commit 194ed2bb9b
2 changed files with 7 additions and 5 deletions

View File

@ -1367,7 +1367,7 @@ DESCRIPTION:
OPTIONS:
--help, -h show help (default: false)
`
`
if output.String() != expected {
t.Errorf("Unexpected wrapping, got:\n%s\nexpected:\n%s",
@ -1436,7 +1436,7 @@ USAGE:
OPTIONS:
--help, -h show help (default: false)
`
`
if output.String() != expected {
t.Errorf("Unexpected wrapping, got:\n%s\nexpected: %s",
@ -1512,7 +1512,7 @@ USAGE:
OPTIONS:
--help, -h show help (default: false)
--test-f value my test usage
`
`
if output.String() != expected {
t.Errorf("Unexpected wrapping, got:\n%s\nexpected: %s",

View File

@ -13,8 +13,10 @@ var visibleCommandCategoryTemplate = `{{range .VisibleCategories}}{{if .Name}}
{{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}{{else}}{{template "visibleCommandTemplate" .}}{{end}}{{end}}`
var visibleFlagCategoryTemplate = `{{range .VisibleFlagCategories}}
{{if .Name}}{{.Name}}
{{end}}{{range .Flags}}{{.}}
{{end}}{{end}}`
{{end}}{{$flglen := len .Flags}}{{range $i, $e := .Flags}}{{if eq (subtract $flglen $i) 1}}{{$e}}
{{else}}{{$e}}
{{end}}{{end}}{{end}}`
var visibleFlagTemplate = `{{range $index, $option := .VisibleFlags}}{{if $index}}{{end}}
{{wrap $option.String 6}}{{end}}`