-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
proposal: cmd/go: go fmt - align all labels #27949
Comments
The string field tag has no defined format. |
Yes, technically the entire text between `` is a single tag. Anything inside that is free-form text. So gofmt should not perform anything inside that. I think there are several proposals to make tags typed. Before that, I don't think we should do any sort of parsing of tags. |
I'll leave it to @griesemer to make the final decision, but I agree that this is not a job for |
The language spec doesn't say anything about the contents of field tags; thus gofmt cannot make assumptions about their content. It's fine if someone wants to use a tool that does this alignment, but it should be separate and must be used with knowledge of the tag's content. |
Agree that this is not gofmt's job. Declining per @griesemer's comment. |
Does it make sense to improve
go fmt
and align all struct's labels not only first one:What version of Go are you using (
go version
)?go version go1.11 darwin/amd64
Does this issue reproduce with the latest release?
yes
What did you do?
go fmt
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: