aboutsummaryrefslogtreecommitdiffstats
path: root/build/goimports.sh
blob: 6d67ef1f0f683001201ad0c7799c86ef2963a98b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env bash

find_files() {
  find . -not \( \
      \( \
        -wholename '.github' \
        -o -wholename './build/_workspace' \
        -o -wholename './build/bin' \
        -o -wholename './crypto/bn256' \
        -o -wholename '*/vendor/*' \
      \) -prune \
    \) -name '*.go'
}

GOFMT="gofmt -s -w";
GOIMPORTS="goimports -w";
find_files | xargs $GOFMT;
find_files | xargs $GOIMPORTS;