Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/gofmt: struct fields not aligned when interrupted by a multi-line expression #31431
I'm getting a werid go fmt -w -s output. The line before a multi-line is not aligned properly in a struct list. In my case, my
What version of Go are you using (
I don't see any difference between those two snippets. What am I missing?
changed the title
go fmt -w -s misaligned columns values for line before a multi-lines
Apr 12, 2019
Currently I have the source code (subject to change when I commit Argon2 cipher) here:
Reconfirmed on Playground: https://play.golang.org/p/5cOTMOiihGx
Let me know what can I contribute back. I'm currently working on a cryptography manager for my toolbox.
p/s: Sorry for the late reply, I was hiking 2 mountains this morning.
This is working as expected. The line length differences between 2nd and 3rd line are large enough for alignment to be (on purpose) broken. As an aside, what you were expecting to see seems also inconsistent since the 3rd line would have to be aligned as well; so your expectation is inconsistent anyway.