diff --git a/gofmt.sh b/gofmt.sh new file mode 100755 index 000000000..e4ae4bd91 --- /dev/null +++ b/gofmt.sh @@ -0,0 +1,6 @@ +#!/bin/bash +fmtcount=`git ls-files | grep '.go$' | xargs gofmt -l 2>&1 | wc -l` +if [ $fmtcount -gt 0 ]; then + echo "run 'go fmt ./...' to format your source code." + exit 1 +fi