LearnProgramming/Hatter — pull request #6 by Expez (2013-01-06 12:17:02+00:00)
Title: Add pre-commit hook running gofmt

This pre-commit hook runs gofmt on all staged .go files. If any syntax errors are encountered they are printed to stdout and the commit aborted. Any non-standard formatting is changed to the recommended style.

The Go emacs mode, and I assume those of other editors too, are imperfect in terms of indentation. Thus running gofmt on all files is good practice.