Commit 3eb0b2e8 authored by Kevin Burke's avatar Kevin Burke

fmt: remove spelling mistake in example

"someting" is misspelled and the error handling both clobbers the
error that occurs and distracts from the point of the example, which
is to demonstrate how Printf works. It's better to just panic with the
error.

Change-Id: I5fb0a4a1a8b4772cbe0302582fa878d95e3a4060
Reviewed-on: https://go-review.googlesource.com/132376Reviewed-by: default avatarDaniel Martí <mvdan@mvdan.cc>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 04bee230
......@@ -32,7 +32,7 @@ func ExampleSprintf() {
func ExampleFprintln() {
n, err := fmt.Fprintln(os.Stdout, "there", "are", 99, "gophers")
if err != nil {
panic("failed writing to stdout, someting is seriously wrong")
panic(err)
}
fmt.Print(n)
// Output:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment