Skip to content

Commit 28e1282

Browse files
authored
fix(internal/cli): add newline after Flags in help text (#2125)
Currently there is a newline after `Commands:` and `Usage:` in the help text. Add a newline after `Flags:` for consistency.
1 parent ace4e05 commit 28e1282

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
@@ -84,7 +84,7 @@ func (c *Command) usage(w io.Writer) {
8484
}
8585
}
8686
if hasFlags(c.Flags) {
87-
fmt.Fprint(w, "\n\nFlags:\n")
87+
fmt.Fprint(w, "\n\nFlags:\n\n")
8888
}
8989
c.Flags.SetOutput(w)
9090
c.Flags.PrintDefaults()

internal/cli/cli_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ Usage:
167167
},
168168
},
169169
want: fmt.Sprintf(`%sFlags:
170+
170171
-name string
171172
name flag (default "default")
172173

0 commit comments

Comments
 (0)