Hacker News new | ask | show | jobs
by 5e92cb50239222b 1611 days ago
I haven't tested this, but maybe it will serve you as a starting point.

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/delta

and then, once:

  $ git config --global interactive.diffFilter diff-fmt
1 comments

Thank you, will try it out :-)