forked from External/ergo
14 lines
263 B
Bash
Executable file
14 lines
263 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# exclude vendor/
|
|
SOURCES="./ergo.go ./irc"
|
|
|
|
if [ "$1" = "--fix" ]; then
|
|
exec gofmt -s -w $SOURCES
|
|
fi
|
|
|
|
if [ -n "$(gofmt -s -l $SOURCES)" ]; then
|
|
echo "Go code is not formatted correctly with \`gofmt -s\`:"
|
|
gofmt -s -d $SOURCES
|
|
exit 1
|
|
fi
|