2 ms·
In this specific case it doesn't do that: any time you add or remove a field from a structure, if it's one of the "extremes" gofmt might re-pad the entire thing
by masklinn 8y ago
In this specific case it doesn't do that: any time you add or remove a field from a structure, if it's one of the "extremes" gofmt might re-pad the entire thing, churning the entire structure.
- eyko 8y agoI actually dislike the new heuristic as it becomes difficult to read `key: value` pair when value is, say, 20 white-spaces padded to the right. I remember having to turn on the "highlight current line" setting in my editor just to do that on some codebases.
- iainmerrick 8y agoWhether you like or dislike it, I don’t understand why it’s changing at all. I thought the main point of gofmt (which I applaud) was to avoid wasting any time whatsoever over formatting issues. It seems counterproductive for the golden formatting spec to be a moving target.