Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
go1.11
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?
If a LabeledStmt has an inline comment before and after the Colon, then an inline comment on the previous line will be indented incorrectly:
https://play.golang.org/p/mSDEYsc_34O
This code should not change with gofmt:
package main
func main() {
/* comment */
L /* long comment */ : /* comment */
print("foo")
goto L
}
... however it changes to:
package main
func main() {
/* comment */
L /* long comment */ : /* comment */
print("foo")
goto L
}
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version)?go1.11Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env)?darwin/amd64What did you do?
If a LabeledStmt has an inline comment before and after the
Colon, then an inline comment on the previous line will be indented incorrectly:https://play.golang.org/p/mSDEYsc_34O
This code should not change with gofmt:
... however it changes to: