Open
Description
What version of Go are you using (go version
)?
go 1.19
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (go env
)?
https://go.dev/play/p/jHX7pcphAmV
What did you do?
Format an atomic.Int32
using the %d
verb.
What did you expect to see?
Since an atomic.Int32
“is an atomic int32
”, I expected that the fmt
verbs that apply for int32
should generate the same representation when applied to an atomic.Int32
.
Or, if the %d
verb is not expected to work in the same way that it does for an int32
, I expect the atomic
package docs to note that detail.
What did you see instead?
Applying the %d
verb to an atomic.Int32
prints it as a struct, not an integer:
{{} 42}
Metadata
Metadata
Assignees
Labels
Type
Projects
Status