go-ethereum/build/goimports.sh
Tomasz Zdybał 68e311ebe0
Makefile,go.*,build: use Go modules
Approach with `_workspace` directory was replaced with Go modules.
gometalinter was updated to v3.0.0.
2019-09-16 11:10:31 +02:00

17 lines
322 B
Bash
Executable file

#!/bin/sh
find_files() {
find . ! \( \
\( \
-path '.github' \
-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