misc: Improve gofmt test case

Add new golang versions, and fail if one is not found.
This commit is contained in:
James Shubin
2016-12-04 21:11:36 -05:00
parent 07fd2e88a2
commit 213a88f62f

View File

@@ -9,9 +9,9 @@ ROOT=$(dirname "${BASH_SOURCE}")/..
GO_VERSION=($(go version)) GO_VERSION=($(go version))
if [[ -z $(echo "${GO_VERSION[2]}" | grep -E 'go1.2|go1.3|go1.4|go1.5|go1.6') ]]; then if [[ -z $(echo "${GO_VERSION[2]}" | grep -E 'go1.2|go1.3|go1.4|go1.5|go1.6|go1.7|go1.8') ]]; then
echo "Unknown go version '${GO_VERSION}', skipping gofmt." echo "Unknown go version '${GO_VERSION[2]}', failing gofmt."
exit 0 exit 1
fi fi
cd "${ROOT}" cd "${ROOT}"