Paul Stemmet
0049df847d
The go devs in their infinite wisdom have decided that extending gofmt / go fmt to error on exit is simply too complicated, so we have to script away their inadequacies for them.
9 lines
150 B
Bash
Executable file
9 lines
150 B
Bash
Executable file
#!/bin/bash
|
|
|
|
if test -n "$(gofmt -l "$@")";
|
|
then
|
|
echo "[ERROR]: gofmt check errors"
|
|
gofmt -l "$@" | xargs -n1 printf ' > %s\n'
|
|
exit 1
|
|
fi
|