init commit

This commit is contained in:
Lei Xue
2015-12-14 10:23:35 +08:00
parent 8a42eb1bab
commit a9a7d63c20
42 changed files with 4261 additions and 1 deletions

21
hack/verify-gofmt.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
find_files() {
find . -not \( \
\( \
-wholename '*/Godeps/*' \
\) -prune \
\) -name '*.go'
}
GOFMT="gofmt -s"
bad_files=$(find_files | xargs $GOFMT -l)
if [[ -n "${bad_files}" ]]; then
echo "!!! '$GOFMT' needs to be run on the following files: "
echo "${bad_files}"
exit 1
fi