aboutsummaryrefslogblamecommitdiffstats
path: root/build/goimports.sh
blob: 1fcace6a4bdf02ee7690405007a3f7f059a3dd72 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
         

              
               
          




                                       



                   



                             
#!/bin/sh

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

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