-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Open
Labels
NeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.Feedback is required from experts, contributors, and/or the community before a change can be made.compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Milestone
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}
CAFxX
Metadata
Metadata
Assignees
Labels
NeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.Feedback is required from experts, contributors, and/or the community before a change can be made.compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Type
Projects
Status
Todo