File: fmt.sh

package info (click to toggle)
golang-github-google-go-github 60.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 6,700 kB
  • sloc: sh: 111; makefile: 5
file content (15 lines) | stat: -rwxr-xr-x 251 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
#/ script/fmt.sh runs go fmt on all go files in the project.

set -e

CDPATH="" cd -- "$(dirname -- "$0")/.."

MOD_DIRS="$(git ls-files '*go.mod' | xargs dirname | sort)"

for dir in $MOD_DIRS; do
  (
    cd "$dir"
    go fmt ./...
  )
done