1
0
Fork 0

Add script to check 'go fmt' status

master
Philip O Toole 9 years ago
parent 5bc007f40b
commit 333caaae75

@ -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
Loading…
Cancel
Save