diff options
author | Kevin Burke <kev@inburke.com> | 2018-08-30 15:39:45 -0600 |
---|---|---|
committer | Kevin Burke <kev@inburke.com> | 2018-08-30 21:59:03 +0000 |
commit | 3eb0b2e80d39f62ac7561e85215e3e7222dba2db (patch) | |
tree | e207b9dfa409cd9ded0b6d051eeaa15a05c5a7b0 /src/fmt | |
parent | 04bee230145759a8f7eadff29f16d7443b215114 (diff) | |
download | go-3eb0b2e80d39f62ac7561e85215e3e7222dba2db.tar.gz go-3eb0b2e80d39f62ac7561e85215e3e7222dba2db.zip |
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/132376
Reviewed-by: Daniel Martà <mvdan@mvdan.cc>
Run-TryBot: Daniel Martà <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/fmt')
-rw-r--r-- | src/fmt/example_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fmt/example_test.go b/src/fmt/example_test.go index 7b7eacafb4..a600ebcafb 100644 --- a/src/fmt/example_test.go +++ b/src/fmt/example_test.go @@ -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: |