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