github.com/niluplatform/go-nilu@v1.7.4-0.20200912082737-a0cb0776d52c/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;