Print out diff if gofmt fails
@@ -23,6 +23,8 @@ echo "Checking gofmt..."
files=$(find . -name "*.go" | grep -v vendor/ | xargs gofmt -l -s)
if [[ $files ]]; then
echo "Gofmt errors in files: $files"
+ diff=$(find . -name "*.go" | grep -v vendor/ | xargs gofmt -d -s)
+ echo "$diff"
exit 1
fi
