You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Except when printed using the verbs %T and %p, special formatting considerations apply for operands that implement certain interfaces. In order of application:
...
4. If an operand implements the error interface, the Error method will be invoked to convert the object to a string, which will then be formatted as required by the verb (if any).
I know is working as documented. Just wanted to point out that this makes sense for %s but at least not for %+v or %v (to my understanding)
Thanks anyway
mikioh
changed the title
Why is "fmt" using the error interface when used with %v and %+v?
fmt: Why is "fmt" using the error interface when used with %v and %+v?
Jan 26, 2018
What version of Go are you using (
go version
)?go1.9.2
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?darwin/amd64
What did you do?
https://play.golang.org/p/LiUkLY1e9c3
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: