mirror of
https://github.com/rancher/os.git
synced 2025-06-20 20:21:54 +00:00
18 lines
282 B
Bash
Executable File
18 lines
282 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
if [[ ! -x "$(which go)" && -x /usr/local/go/bin/go ]]; then
|
|
PATH=/usr/local/go/bin:${PATH}
|
|
fi
|
|
|
|
cd $(dirname $0)/..
|
|
|
|
result=$(find . -name "*.go" | grep -v ./Godeps | xargs gofmt -l)
|
|
for i in $result; do
|
|
echo $i
|
|
done
|
|
|
|
[ -n "$result" ] && exit 1
|
|
|
|
echo OK
|