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