您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

13 行
310 B

  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