From: Ian Lance Taylor Date: Wed, 20 Sep 2023 22:15:45 +0000 (-0700) Subject: fmt: clarify that we don't call String for %#v X-Git-Tag: go1.22rc1~755 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=51d2e9cbfa05ce5032ebb758b78fa91227366b4f;p=gostls13.git 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 Reviewed-by: Ian Lance Taylor Reviewed-by: Rob Pike Reviewed-by: Than McIntosh LUCI-TryBot-Result: Go LUCI --- 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