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