1
0
Fork 0
hivemind/.githooks/pre-commit

10 lines
168 B
Bash
Executable file

#!/bin/bash
changed="$(gofmt -d .)"
[ -n "$changed" ] && {
echo 'Some files are not formatted'
delta <<< "$changed"
go fmt ./...
exit 1
}
go vet ./...