yanic/.circleci/check-gofmt

9 lines
175 B
Plaintext
Raw Permalink Normal View History

2018-01-13 15:46:37 +00:00
#!/bin/bash
2018-05-13 19:07:48 +00:00
result="$(gofmt -s -l . | grep -v '^vendor/' )"
2018-01-13 15:46:37 +00:00
if [ -n "$result" ]; then
echo "Go code is not formatted, run 'gofmt -s -w .'" >&2
echo "$result"
exit 1
fi