github.com/99designs/gqlgen@v0.17.45/.github/workflows/check-fmt (about)

     1  #!/bin/bash
     2  
     3  set -exuo pipefail
     4  export GO111MODULE=on
     5  go fmt ./...
     6  cd _examples && go fmt ./...
     7  if [[ $(git --no-pager diff) ]] ; then
     8      echo "you need to run "go fmt" and commit the changes"
     9      git --no-pager diff
    10      exit 1
    11  fi