Make gofmt message explicit about -s option

pull/6/head
jayunit100 2015-04-06 00:12:06 -04:00
parent 3d1dfd47ee
commit 8d6c163650
1 changed files with 3 additions and 2 deletions

View File

@ -44,9 +44,10 @@ find_files() {
\) -name '*.go'
}
bad_files=$(find_files | xargs gofmt -s -l)
GOFMT="gofmt -s"
bad_files=$(find_files | xargs $GOFMT -l)
if [[ -n "${bad_files}" ]]; then
echo "!!! gofmt needs to be run on the following files: "
echo "!!! '$GOFMT' needs to be run on the following files: "
echo "${bad_files}"
exit 1
fi