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
I think that this is working as intended--when there are significant length differences between subseqeuent fields, gofmt doesn't attempt to align them. You can boil this frog slowly, but not quickly:
If the ratio between previous entry length and current entry length passes a certain threshold, the "alignment block" is broken. The reason is that we don't a very long list of mostly short entries be dominated by the formatting of a single long entry (which may be on the "next page" on the screen). This is an admittedly simple heuristic, and probably could be improved, but it works mostly ok.
mikioh
changed the title
gofmt strange formatting of the last line within (long?) struct initialization
cmd/gofmt: strange formatting of the last line within (long?) struct initialization
Apr 9, 2015
gofmt is suggesting the following formatting of struct:
The last line (NodeStatusUpdateFrequency) formatting seems pretty strange.
For the reference see:
kubernetes/kubernetes#6620
cc @fgrzadkowski @gmarek @jszczepkowski
The text was updated successfully, but these errors were encountered: