Skip to content

Commit 305d7a5

Browse files
authored
fix(internal/cli): add newline after Usage in help text (#2110)
Currently there is a newline after `Commands:` but not `Usage:` in the help text. Add a newline after `Usage:` for consistency.
1 parent 6874d3d commit 305d7a5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

internal/cli/cli.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func (c *Command) usage(w io.Writer) {
7474
}
7575

7676
fmt.Fprintf(w, "%s\n\n", c.Long)
77-
fmt.Fprintf(w, "Usage:\n %s", c.UsageLine)
77+
fmt.Fprintf(w, "Usage:\n\n %s", c.UsageLine)
7878
if len(c.Commands) > 0 {
7979
fmt.Fprint(w, "\n\nCommands:\n")
8080
for _, c := range c.Commands {

internal/cli/cli_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ func TestUsage(t *testing.T) {
143143
preamble := `Test prints test information.
144144
145145
Usage:
146+
146147
test [flags]
147148
148149
`

0 commit comments

Comments
 (0)