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

go/printer: line wrapping? #380

Closed
gopherbot opened this issue Dec 4, 2009 · 6 comments
Closed

go/printer: line wrapping? #380

gopherbot opened this issue Dec 4, 2009 · 6 comments

Comments

@gopherbot
Copy link

by yiyu.jgl:

gofmt has not limit for the length of a line.

For example: since it concatenates in the same line constants definitions,
it will produce too long lines when you define a big number of constants
inside a const statement, eg:

http://hg.4l77.com/go/ngaro/file/tip/image.go#l10
@griesemer
Copy link
Contributor

Comment 1:

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

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Dec 16, 2009

Comment 2:

Status changed to LongTerm.

@mark-summerfield
Copy link

Comment 3:

I really hope you add a -maxlinelen option to gofmt that does nice indented wrapping as
necessary.

@rsc
Copy link
Contributor

rsc commented Dec 9, 2011

Comment 4:

Labels changed: added priority-later.

@rsc
Copy link
Contributor

rsc commented Jan 29, 2012

Comment 5:

Labels changed: added priority-someday, removed priority-later.

@rsc
Copy link
Contributor

rsc commented Jul 30, 2013

Comment 6:

I think this is fixed.
Constants are no longer concatenated, and the newline in +\n is kept.
Comments are wrapped when displayed in godoc.
So there's no compelling reason for gofmt to mess around with wrapping.

Status changed to WorkingAsIntended.

@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

4 participants