feat(test): check format conditions in test

And add option '--fmt' in build script to gofmt files automatically.
This commit is contained in:
Yicheng Qin
2014-03-31 12:18:57 -07:00
parent 140329d927
commit 3fece6a716
2 changed files with 13 additions and 0 deletions

View File

@@ -2,6 +2,13 @@
. ./build
fmtRes=`gofmt -l $GOFMTPATH`
if [ "$fmtRes" != "" ]; then
echo "Failed to pass golang format checking."
echo "Please gofmt modified go files, or run './build --fmt'."
exit 1
fi
go test -i ./http
go test -v ./http