github.com/n1ghtfa1l/go-vnt@v0.6.4-alpha.6/build/goimports.sh (about) 1 #!/usr/bin/env bash 2 3 find_files() { 4 find . -not \( \ 5 \( \ 6 -wholename '.github' \ 7 -o -wholename './build/_workspace' \ 8 -o -wholename './build/bin' \ 9 -o -wholename './crypto/bn256' \ 10 -o -wholename '*/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;