github.com/wangyougui/gf/v2@v2.6.5/.github/workflows/before_script.sh (about)

     1  #!/usr/bin/env bash
     2  
     3  find . -name "*.go" | xargs gofmt -w
     4  git diff --name-only --exit-code || if [ $? != 0 ]; then echo "Notice: gofmt check failed,please gofmt before pr." && exit 1; fi
     5  echo "gofmt check pass."
     6  sudo echo "127.0.0.1   local" | sudo tee -a /etc/hosts