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 map alignment issue #644

Closed
hoisie opened this issue Mar 4, 2010 · 2 comments
Closed

gofmt map alignment issue #644

hoisie opened this issue Mar 4, 2010 · 2 comments

Comments

@hoisie
Copy link
Contributor

hoisie commented Mar 4, 2010

What steps will reproduce the problem?
1. run gofmt on this code: http://pastie.org/853977

What is the expected output? What do you see instead?
expect the map items to be aligned, but they aren't

What is your $GOOS?  $GOARCH?
linux/amd64

Which revision are you using?  (hg identify)
release-2010-03-04
@griesemer
Copy link
Contributor

Comment 1:

This is working as designed, but the current design is not great. Currently, if a key-
value pair exceeds a certain size (in chars) it's simply not aligned with the rest. A
better 
solution is to make that decision on some ratio. We want outliers not to cause the 
aligned composite literal to be overly wide, but at the same time, if all entries are
wide, 
they should be aligned. Better heuristic forthcoming.

Owner changed to g...@golang.org.

Status changed to Started.

@griesemer
Copy link
Contributor

Comment 2:

This issue was closed by revision e8a049b.

Status changed to Fixed.

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

3 participants