Commit 4b9490ee authored by Russ Cox's avatar Russ Cox

fmt: document that unexported struct fields don't get the String/Error treatment

Fixes #17409.

Change-Id: Ib49ff4a467431b5c1e6637e5144979cf0bfba489
Reviewed-on: https://go-review.googlesource.com/31817Reviewed-by: default avatarMartin Möhrmann <martisch@uos.de>
Reviewed-by: default avatarQuentin Smith <quentin@golang.org>
parent 59b0e147
......@@ -174,6 +174,9 @@
that type has a String method. Such pathologies are rare, however,
and the package does not protect against them.
When printing a struct, fmt cannot and therefore does not invoke
formatting methods such as Error or String on unexported fields.
Explicit argument indexes:
In Printf, Sprintf, and Fprintf, the default behavior is for each
......
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