golang-lib/.ci/check-gofmt

10 lines
176 B
Plaintext
Raw Permalink Normal View History

2018-08-24 01:21:35 +02:00
#!/bin/bash
result="$(gofmt -s -l . | grep -v '^vendor/' )"
if [ -n "$result" ]; then
echo "Go code is not formatted, run 'gofmt -s -w .'" >&2
echo "$result"
exit 1
fi