2018-10-30 23:52:54 +03:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
RETVAL=0
|
|
|
|
|
2018-12-22 21:48:18 +03:00
|
|
|
for file in $(find . -name '*.go' -not -path './build/*')
|
2018-10-30 23:52:54 +03:00
|
|
|
do
|
|
|
|
if [ -n "$(gofmt -l $file)" ]
|
|
|
|
then
|
|
|
|
echo "$file does not conform to gofmt rules. Run: gofmt -s -w $file" >&2
|
|
|
|
RETVAL=1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
exit $RETVAL
|