by 5e92cb50239222b · 4y ago · 0 comments
Throw this script into $PATH (let's say into ~/.local/bin/diff-fmt):
#!/bin/bash
exec delta <(gofmt "$1") <(gofmt "$2")
here I'm using delta as the difftool: https://github.com/dandavison/deltaand then, once:
$ git config --global interactive.diffFilter diff-fmt