選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

check_go_fmt.sh 310 B

123456789101112
  1. #!/bin/bash
  2. # This script is used by the CI to check if the code is gofmt formatted.
  3. set -euo pipefail
  4. GOFMT_DIFF=$(IFS=$'\n'; gofmt -d $( find . -type f -name '*.go' ) )
  5. if [[ -n "${GOFMT_DIFF}" ]]; then
  6. echo "${GOFMT_DIFF}"
  7. echo
  8. echo "The go source files aren't gofmt formatted."
  9. exit 1
  10. fi