github.com/google/go-github/v60@v60.0.0/script/fmt.sh (about)

     1  #!/bin/sh
     2  #/ script/fmt.sh runs go fmt on all go files in the project.
     3  
     4  set -e
     5  
     6  CDPATH="" cd -- "$(dirname -- "$0")/.."
     7  
     8  MOD_DIRS="$(git ls-files '*go.mod' | xargs dirname | sort)"
     9  
    10  for dir in $MOD_DIRS; do
    11    (
    12      cd "$dir"
    13      go fmt ./...
    14    )
    15  done