mirror of
https://github.com/jeremyd/ergo.git
synced 2026-05-20 06:44:46 -07:00
add make gofmt
This commit is contained in:
@@ -3,6 +3,10 @@
|
||||
# exclude vendor/
|
||||
SOURCES="./oragono.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
|
||||
|
||||
Reference in New Issue
Block a user