You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
445 B

set -e -o pipefail
OUTPUT=$(for d in $(go list -mod=vendor -f '{{.Dir}}' -a ./... | fgrep -v tunnelrpc) ; do goimports -format-only -local -d $d ; done)
if [ -n "$OUTPUT" ] ; then
PAGER=$(which colordiff || echo cat)
echo "Code formatting issues found, use 'goimports -format-only -local' to correct them"
echo "$OUTPUT" | $PAGER
exit 1