Skip to content

gofmt -align=false -spaces=true dont work together #100

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

Closed
gopherbot opened this issue Nov 12, 2009 · 7 comments
Closed

gofmt -align=false -spaces=true dont work together #100

gopherbot opened this issue Nov 12, 2009 · 7 comments

Comments

@gopherbot
Copy link
Contributor

by jankassens:

If -align=false and -spaces=true are used together, the spaces flag is overridden and
tabs are used.
@rsc
Copy link
Contributor

rsc commented Nov 12, 2009

Comment 1:

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

Status changed to Accepted.

@griesemer
Copy link
Contributor

Comment 3:

In RawFormat mode, the go/printer output is not run through the tabwriter at all and
thus the -spaces flag is not 
even looked at. Thus it does operate as originally intended, however the documentation
is incorrect; but possibly 
the original intent should be changed. Thinking about this.

Status changed to Started.

@rsc
Copy link
Contributor

rsc commented Nov 12, 2009

Comment 4:

Status changed to Thinking.

@griesemer
Copy link
Contributor

Comment 5:

Making gofmt do "the right thing" with -spaces and -align=false does not make much
sense: The output in the -
align=false mode is the input intended for the tabwriter package. It is neither aligned
nor misaligned, and it is 
only reasonably readable because go/printer removes control characters (such as '\v' and
'\f' intended to drive 
the tabwriter) from the output stream.

@gopherbot
Copy link
Contributor Author

Comment 6 by jankassens:

If align=false is considered a private flag, I think it should be removed or marked as
such.

@griesemer
Copy link
Contributor

Comment 7:

CL is pending for its removal.

@griesemer
Copy link
Contributor

Comment 8:

This issue was closed by revision 511772c.

Status changed to Fixed.

Merged into issue #-.

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