3
0
mirror of https://github.com/ergochat/ergo.git synced 2025-02-12 11:40:40 +01:00

14 lines
231 B
Bash
Raw Normal View History

2025-01-13 18:47:21 -08:00
#!/bin/bash
SOURCES="."
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