Skip to content

Commit

Permalink
cmd/cover: use fmt.Print for newline-ending fixed string
Browse files Browse the repository at this point in the history
This redundancy is now caught by the improved printf vet checker
(#30436).

Updates #49322

Change-Id: Id450247adc6fa28a9244c019be3c1b52c2d17f49
Reviewed-on: https://go-review.googlesource.com/c/go/+/361263
Run-TryBot: Zvonimir Pavlinovic <zpavlinovic@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Zvonimir Pavlinovic <zpavlinovic@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
  • Loading branch information
zpavlinovic committed Nov 4, 2021
1 parent 91962df commit 9cf6711
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cmd/cover/cover.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ Finally, to generate modified source code with coverage annotations
`

func usage() {
fmt.Fprintln(os.Stderr, usageMessage)
fmt.Fprintln(os.Stderr, "Flags:")
fmt.Fprint(os.Stderr, usageMessage)
fmt.Fprintln(os.Stderr, "\nFlags:")
flag.PrintDefaults()
fmt.Fprintln(os.Stderr, "\n Only one of -html, -func, or -mode may be set.")
os.Exit(2)
Expand Down

0 comments on commit 9cf6711

Please sign in to comment.