test 282 B

123456789101112131415161718
  1. #!/bin/bash
  2. set -e
  3. if [[ ! -x "$(which go)" && -x /usr/local/go/bin/go ]]; then
  4. PATH=/usr/local/go/bin:${PATH}
  5. fi
  6. cd $(dirname $0)/..
  7. result=$(find . -name "*.go" | grep -v ./Godeps | xargs gofmt -l)
  8. for i in $result; do
  9. echo $i
  10. done
  11. [ -n "$result" ] && exit 1
  12. echo OK