Fixed gofmt formating, updated precommit hook

This commit is contained in:
Torkel Ödegaard
2015-03-07 16:37:19 +01:00
parent d8005af8ee
commit ebad9cb502
3 changed files with 40 additions and 33 deletions

7
.hooks/pre-commit Executable file
View File

@@ -0,0 +1,7 @@
#!/usr/bin/env bash
test -z "$(gofmt -s -l . | grep -v Godeps/_workspace/src/ | tee /dev/stderr)"
if [ $? -gt 0 ]; then
echo "Some files aren't formatted, please run 'go fmt ./pkg/...' to format your source code before committing"
exit 1
fi