github.com/cdoern/storage@v1.12.13/hack/gofmt.sh (about)

     1  #!/bin/bash
     2  if test $(find -name "*.go" -not -path "./vendor/*" -print0 | xargs -n 1 -0 gofmt -s -l | wc -l) -ne 0 ; then
     3  	echo Error: source files are not formatted according to recommendations.  Run \"gofmt -s -w\" on:
     4  	find -name "*.go" -not -path "./vendor/*" -print0 | xargs -n 1 -0 gofmt -s -l
     5  	exit 1
     6  fi
     7  exit 0