Files
nats-server/travis/gofmt.sh
Ken Robertson bc84847123 Update the gofmt and govet to be forwards compatible
Newer versions of gofmt and govet will exit non-zero if they find any issues.
This simply sets -e to ensure the scripts will also exit non-zero to properly
trigger a build failure.
2014-10-15 16:54:20 -07:00

14 lines
230 B
Bash
Executable File

#!/bin/sh -e
# run go fmt and exit non-zero if it detected anything
T=$(mktemp -t gofmt.XXXXX)
go fmt ./... > $T
if egrep -q '.*' "$T" ; then
echo "go fmt failed on the following files:"
cat "$T"
rm $T
exit 1
fi
rm $T
exit 0