]> Cypherpunks repositories - gostls13.git/commit
fmt: add an example for Errorf
authorianzapolsky <ianzapolsky@gmail.com>
Thu, 30 Aug 2018 18:57:16 +0000 (12:57 -0600)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 30 Aug 2018 19:40:13 +0000 (19:40 +0000)
commitd5c7abf73a3f65cb7d5b9c3193e59ac9e0729c7a
tree4692f68c075d3df0189cae6c18be9e0266346c5f
parente84409ac95d5ed4a9113128c72d8f930f034aebf
fmt: add an example for Errorf

The errors package has an example for Errorf, but the fmt
package does not. Copy the Errorf example from errors to
fmt. Move existing Stringer example into separate file, so as
not to break the assumption that the entire file will be
presented as the example.

Change-Id: I8a210a69362017fa08615a8c3feccdeee8427e22
Reviewed-on: https://go-review.googlesource.com/132239
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/fmt/example_test.go
src/fmt/stringer_example_test.go [new file with mode: 0644]