yanic/.travis.gofmt.sh
2018-05-15 21:56:32 +02:00

9 lines
175 B
Bash
Executable File

#!/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