You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No change in formatting of this code between go1.10 and go1.11
What did you see instead?
gofmt from go1.11rc1 reformats this code in a lesser readable way than go1.10: first entry of the map is not indented in the same way as other entries.
One minor detail of the default formatting of Go source code has changed. When formatting expression lists with inline comments, the comments were aligned according to a heuristic. However, in some cases the alignment would be split up too easily, or introduce too much whitespace. The heuristic has been changed to behave better for human-written code.
Also note that:
[...] these kinds of minor updates to gofmt are expected from time to time. In general, systems that need consistent formatting of Go source code should use a specific version of the gofmt binary.
What version of Go are you using (
go version
)?gofmt from go1.11rc1
Does this issue reproduce with the latest release?
yes, go1.11rc1
What did you do?
main.go formatted with gofmt from go1.10:
What did you expect to see?
No change in formatting of this code between go1.10 and go1.11
What did you see instead?
gofmt from go1.11rc1 reformats this code in a lesser readable way than go1.10: first entry of the map is not indented in the same way as other entries.
The text was updated successfully, but these errors were encountered: