diff --git a/tool/fmtck.sh b/tool/fmtck.sh new file mode 100755 index 0000000..20b2134 --- /dev/null +++ b/tool/fmtck.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +if test -n "$(gofmt -l "$@")"; +then + echo "[ERROR]: gofmt check errors" + gofmt -l "$@" | xargs -n1 printf ' > %s\n' + exit 1 +fi