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
There seems to be an edge case with math operator spacing in gofmt. Normally gofmt
adds/preserves spaces around expressions like "a := (b + (1 / (2 * c * c))) *
100" but when a function is added like the spacing is lost. So given an input like
"a := math.Abs(b + (1 / (2 * c * c))) * 100" gofmt will produce "a :=
math.Abs(b+(1/(2*c*c))) * 100".
Seeing this against the following builds/versions and the play.golang.org site:
go version go1.2.1 darwin/amd64
go version go1.2.1 linux/amd64
Here's a simple example: http://play.golang.org/p/BwLsi2-iU_
A more complex one: http://play.golang.org/p/w5jx0py1Xc
In both cases, the combination of a function call with another expression leads to the
loss of formatting in the function call's argument.
The text was updated successfully, but these errors were encountered:
by magwebpub:
The text was updated successfully, but these errors were encountered: