Skip to content

Commit

Permalink
Remove extra 3 spaces in last line
Browse files Browse the repository at this point in the history
  • Loading branch information
dearchap committed Oct 5, 2022
1 parent 1f03aa4 commit 8dbcbed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions help_test.go
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
6 changes: 4 additions & 2 deletions template.go
Expand Up @@ -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}}`
Expand Down

0 comments on commit 8dbcbed

Please sign in to comment.