You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
why not have all the `` under each other? so instead of having little blocks and some of them are in column 30, some in column 33 etc, why not all be in max column of those blocks, like say column 37?
The text was updated successfully, but these errors were encountered:
mikioh
changed the title
gofmt: formatting of `` in structs could be better
cmd/gofmt: formatting of `` in structs could be better
Jul 24, 2015
josharian
changed the title
cmd/gofmt: formatting of `` in structs could be better
cmd/gofmt: formatting of tags in structs could be better
Jul 24, 2015
josharian
changed the title
cmd/gofmt: formatting of tags in structs could be better
cmd/gofmt: align struct tags
Jul 24, 2015
They are not aligned because they are not in an uninterrupted column. All the tags across a sequence of lines where each line contains a tag are aligned. As soon as a line doesn't have a tag, the "tag column" is terminated. This is very much the intent and a strategy applied everywhere throughout gofmt (the same applies for comments).
@pvinis The reason it works as it does is because there was no intent to make it work differently than any other alignment. It's the absence of making a (different) choice.
take this struct for example
https://github.com/go-gitea/gitea/blob/master/models/issue.go#L33
why not have all the `` under each other? so instead of having little blocks and some of them are in column 30, some in column 33 etc, why not all be in max column of those blocks, like say column 37?
The text was updated successfully, but these errors were encountered: