github.com/fastly/go-fastly/v6@v6.8.0/scripts/check-gofmt.sh (about) 1 #!/usr/bin/env bash 2 3 echo "==> Checking that code complies with gofmt requirements..." 4 5 gofmt_files=$(gofmt -l -s `find . -name '*.go' | grep -v vendor`) 6 if [[ -n ${gofmt_files} ]]; then 7 echo 'gofmt needs to be run on the following files:' 8 echo " ===== " 9 echo "${gofmt_files}" 10 echo " ===== " 11 echo "You can use the command: \`make fmt\` to resolve." 12 exit 1 13 fi