Created
August 14, 2019 21:47
-
-
Save mdsauce/3f0398e9b10bec6c862e5374c5cf22c9 to your computer and use it in GitHub Desktop.
Go pre-commit hook for `.git/hooks` snippet for keeping code formatted
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Must be named 'pre-commit' with no extension | |
# run go fmt then exit | |
echo running go fmt tool | |
go fmt ./... | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment