3
0
mirror of https://github.com/ergochat/ergo.git synced 2025-01-22 02:04:10 +01:00
ergo/vendor/github.com/ergochat/webpush-go/v2/.check-gofmt.sh

14 lines
231 B
Bash
Raw Normal View History

2025-01-14 03:47:21 +01: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