Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gofmt from tip seems to misalign fields #4428

Closed
niemeyer opened this issue Nov 23, 2012 · 3 comments
Closed

gofmt from tip seems to misalign fields #4428

niemeyer opened this issue Nov 23, 2012 · 3 comments
Milestone

Comments

@niemeyer
Copy link
Contributor

We seem to be having a "gofmt fight" between 1.0.3 and tip, repeatedly going
back and forth:

https://golang.org/cl/6854088/diff/10001/juju/bootstrap.go

The behavior from 1.0.3 looked correct. Was that accidental?
@minux
Copy link
Member

minux commented Nov 23, 2012

Comment 1:

this is "introduced" by: https://golang.org/cl/6610051

@griesemer
Copy link
Contributor

Comment 2:

I suspect this is coming from different people running different (and not up-to-date)
versions of gofmt.
As pointed out by minux.ma, the CL 6610051 - which fixed a real bug - caused some fields
to be aligned differently than before. In fact, the alignment before - while it may look
better in some places - was not symmetric (depending on which way the field width
changed - up or down on the page)  alignment would change or not.
The way out is probably to enforce that the latest version of gofmt is used before
submits.

Status changed to WorkingAsIntended.

@niemeyer
Copy link
Contributor Author

Comment 3:

That particular case is perhaps a bad example then? It does look like the old style was
better.

@rsc rsc added this to the Go1.1 milestone Apr 14, 2015
@rsc rsc removed the go1.1 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants