github.com/kisexp/xdchain@v0.0.0-20211206025815-490d6b732aa7/build/goimports.sh (about) 1 #!/bin/sh 2 3 find_files() { 4 find . ! \( \ 5 \( \ 6 -path '.github' \ 7 -o -path './build/_workspace' \ 8 -o -path './build/bin' \ 9 -o -path './crypto/bn256' \ 10 -o -path '*/vendor/*' \ 11 \) -prune \ 12 \) -name '*.go' 13 } 14 15 GOFMT="gofmt -s -w" 16 GOIMPORTS="goimports -w" 17 find_files | xargs $GOFMT 18 find_files | xargs $GOIMPORTS