@quarnster it's possible to run gofmt with a git [pre-commit hook](https://github.com/edsrzf/gofmt-git-hook) but the hooks don't follow the repository (probably for security, so that people don't have to worry about evil hooks damaging their system after a clone). One solution is to put the hooks in the repo and symlink them into .git/hooks, however every developer would have to remember to symlink after cloning.

Another option is to put gofmt -l in the CI script, and fail the tests if the output is nonempty. That way, tests will always fail unless all files are formatted.