-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Open
Labels
BugReportIssues describing a possible bug in the Go implementation.Issues describing a possible bug in the Go implementation.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Description
Go version
go version go1.25.5 darwin/arm64
Description
I noticed that gofmt produces the following formatting for a byte slice literal:
fr.Write([]byte{
0x00, // Preamble
0x00, 0xFF, // Start code
dlen, // LEN
^dlen + 1, // LCS
tfi, // Type of Frame Identifier
})My expectation was that comments would remain aligned consistently. Is this a known limitation or intended behavior of gofmt? Apologies if this was already reported.
(Go 1.24 produces the same output: https://go.dev/play/p/jxcnuqd6IsA?v=goprev)
Metadata
Metadata
Assignees
Labels
BugReportIssues describing a possible bug in the Go implementation.Issues describing a possible bug in the Go implementation.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.