]> Cypherpunks repositories - gostls13.git/commit
fmt: document existing behavior of nil receivers
authorRob Pike <r@golang.org>
Sun, 1 Mar 2015 16:56:25 +0000 (08:56 -0800)
committerRob Pike <r@golang.org>
Sun, 1 Mar 2015 18:17:53 +0000 (18:17 +0000)
commit3ee9df799fc76e06b216248735e530dd4e1dc504
treed7295a52c2903c95f4896a99189a5b546468137c
parentbc674b3d16cd9e7d25f8b23d0562c954b7a979be
fmt: document existing behavior of nil receivers

If a method called by fmt triggers a panic, the output usually says
so. However, there is heretofore undocumented special treatment for
a panic caused by formatting a nil value with an Error or String
method: the output is simply "<nil>". Document that behavior.

Change-Id: Id0f79dd0b3487f9d1c74a0856727bba5cc342be4
Reviewed-on: https://go-review.googlesource.com/6410
Reviewed-by: David Crawshaw <crawshaw@golang.org>
src/fmt/doc.go