What version of Go are you using (go version)?
go version go1.10.3 windows/amd64
Does this issue reproduce with the latest release?
Yes, see https://play.golang.org/p/Gv-AmNeMSdT
What did you do?
Open https://play.golang.org/p/Gv-AmNeMSdT, click Format.
What did you expect to see?
After formatting, the program still compiles.
What did you see instead?
Gofmt removes the comma, leading to a syntax error:
prog.go:8:33: syntax error: unexpected newline, expecting comma or )
What version of Go are you using (
go version)?go version go1.10.3 windows/amd64
Does this issue reproduce with the latest release?
Yes, see https://play.golang.org/p/Gv-AmNeMSdT
What did you do?
Open https://play.golang.org/p/Gv-AmNeMSdT, click Format.
What did you expect to see?
After formatting, the program still compiles.
What did you see instead?
Gofmt removes the comma, leading to a syntax error: