diff options
| author | Ian Lance Taylor <iant@golang.org> | 2023-09-20 15:15:45 -0700 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-09-25 14:28:27 +0000 |
| commit | 51d2e9cbfa05ce5032ebb758b78fa91227366b4f (patch) | |
| tree | 8e6001f4ab6d7bff66566e1032c43bb43ef7218a /src/fmt | |
| parent | 451e4727ec825a7ce6f6e6f82761ff90c33fec83 (diff) | |
| download | go-51d2e9cbfa05ce5032ebb758b78fa91227366b4f.tar.xz | |
fmt: clarify that we don't call String for %#v
Change-Id: I4edf8bd6f9ab813acf1d05c603f6f562fa00cb48
Reviewed-on: https://go-review.googlesource.com/c/go/+/529975
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/fmt')
| -rw-r--r-- | src/fmt/doc.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fmt/doc.go b/src/fmt/doc.go index 9785ed9526..1cda484d8a 100644 --- a/src/fmt/doc.go +++ b/src/fmt/doc.go @@ -180,7 +180,8 @@ controlled by that implementation. implements the GoStringer interface, that will be invoked. If the format (which is implicitly %v for Println etc.) is valid -for a string (%s %q %v %x %X), the following two rules apply: +for a string (%s %q %x %X), or is %v but not %#v, +the following two rules apply: 4. If an operand implements the error interface, the Error method will be invoked to convert the object to a string, which will then |
