3 ms·
> note that gofmt doesn't indent, which is the hard part interesting because for me it's hard to read changelogs of js/ts based repos that are using prettier c
by ramenmeal 3y ago
> note that gofmt doesn't indent, which is the hard part
interesting because for me it's hard to read changelogs of js/ts based repos that are using prettier compared to go repos, I wonder if the indentation is a reason for that. I'm honestly not sure what the author means by that either, gofmt seems to fix indentation for me.
- andrewstuart2 3y agoYeah, gofmt does and always has fixed indentation (by tabs, thus avoiding another pointless conversation on teams using it).
- dochne 3y agoIf you're reading a PR diff on GitHub you can get it to ignore whitespace diffs by adding ?w=1 to the url - complete lifesaver in this kind of situation.
- chatmasta 3y agoAlso, the white space diffs shouldn't be significant as long as all the files were already properly formatted before the change. If your diffs are including unrelated formatting changes, then you should do a single commit to format all your files. You can also use git-ignore-revs so that this formatting commit won't show up in git blame.