mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-09 10:18:04 +08:00
20 lines
333 B
Bash
Executable File
20 lines
333 B
Bash
Executable File
#!/bin/sh
|
|
|
|
#TODO add go lint and go vet
|
|
|
|
verify_gofmt() {
|
|
GOFMT="gofmt -s"
|
|
cd "$(git rev-parse --show-toplevel)"
|
|
bad_files=$($GOFMT -l .)
|
|
cd -
|
|
if [[ -n $bad_files ]]; then
|
|
echo "You have to run '$GOFMT' on these files:"
|
|
echo "$bad_files"
|
|
false
|
|
else
|
|
true
|
|
fi
|
|
}
|
|
|
|
verify_gofmt
|