From 51d2e9cbfa05ce5032ebb758b78fa91227366b4f Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 20 Sep 2023 15:15:45 -0700 Subject: [PATCH] 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 --- src/fmt/doc.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.51.0