2018-08-07 13:31:06 +00:00
|
|
|
#!/bin/sh
|
2018-04-24 15:50:26 +00:00
|
|
|
|
|
|
|
find_files() {
|
2018-08-07 13:31:06 +00:00
|
|
|
find . ! \( \
|
2018-04-24 15:50:26 +00:00
|
|
|
\( \
|
2018-08-07 13:31:06 +00:00
|
|
|
-path '.github' \
|
|
|
|
-o -path './build/_workspace' \
|
|
|
|
-o -path './build/bin' \
|
|
|
|
-o -path './crypto/bn256' \
|
|
|
|
-o -path '*/vendor/*' \
|
2018-04-24 15:50:26 +00:00
|
|
|
\) -prune \
|
|
|
|
\) -name '*.go'
|
|
|
|
}
|
|
|
|
|
2018-08-07 13:31:06 +00:00
|
|
|
GOFMT="gofmt -s -w"
|
|
|
|
GOIMPORTS="goimports -w"
|
|
|
|
find_files | xargs $GOFMT
|
|
|
|
find_files | xargs $GOIMPORTS
|