gofmt from tip seems to misalign fields #4428

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

Comments

Projects
None yet
5 participants
Contributor

niemeyer commented Nov 23, 2012

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?
Member

minux commented Nov 23, 2012

Comment 1:

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

griesemer commented Nov 26, 2012

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.

Contributor

niemeyer commented Nov 26, 2012

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

@gopherbot gopherbot 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.