-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
Description
by akidan:
gofmt can emit code that does not compile if a field in a multiline struct literal is followed immediately by a single-line comment What steps will reproduce the problem? 1. run gofmt on the sample program attached (important part is as follows:) var notOk s = s{ a: 1,// } What is the expected output? var notOk s = s{ a: 1, // } What do you see instead? var notOk s = s{ a: 1 // , } What is your $GOOS? $GOARCH? darwin amd64 Which revision are you using? (hg identify) e004d329064a+ tip Please provide any additional information below.
Attachments:
- sample.go (96 bytes)