What version of Go are you using (go version)? go version go1.4.2 linux/amd64
What operating system and processor architecture are you using? Ubuntu 14.04
What did you do? Run gofmt on below code examples
What did you expect to see? Consistent spacing of slice indices
These are two lines within the same function. They vary slightly, but the interesting part is the [1:len(key-1] which has inconsistent spacing. Adding spaces to the first one will result in them being removed when gofmt is run, and removing the spaces from the second will only have them added back.
If this is not a bug, please let me know what difference here is causing the spacing to change.
return "?" + key[1:len(key)-1]
key = key[1 : len(key)-1]
What version of Go are you using (go version)?
go version go1.4.2 linux/amd64What operating system and processor architecture are you using? Ubuntu 14.04
What did you do? Run
gofmton below code examplesWhat did you expect to see? Consistent spacing of slice indices
These are two lines within the same function. They vary slightly, but the interesting part is the
[1:len(key-1]which has inconsistent spacing. Adding spaces to the first one will result in them being removed whengofmtis run, and removing the spaces from the second will only have them added back.If this is not a bug, please let me know what difference here is causing the spacing to change.