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

cmd/gofmt: unaligned fields when a short field name is followed by a long field name #20500

hyangah opened this issue May 25, 2017 · 1 comment


Copy link

@hyangah hyangah commented May 25, 2017

The following is gofmt'd code.

	a := &A{
		Cell: 2,
		F01234567890123456789: 3,

Visit and run "Format" button.

What version of Go are you using (go version)?


Copy link

@bradfitz bradfitz commented May 25, 2017

This is intentional and has come up periodically in the past. (e.g. #20258, #10392, etc)

gofmt has heuristics to not make large jumps if one field is much longer than the others.

@bradfitz bradfitz closed this May 25, 2017
@golang golang locked and limited conversation to collaborators May 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.