add golang check

上级 62ce647d
#!/usr/bin/env bash
goimports="goimports"
find_files() {
find . -not \( \
\( \
-wholename './output' \
-o -wholename './_output' \
-o -wholename './_gopath' \
-o -wholename './release' \
-o -wholename './target' \
-o -wholename '*/third_party/*' \
-o -wholename '*/vendor/*' \
\) -prune \
\) -name '*.go'
}
diff=$(find_files | xargs ${goimports} -d -e 2>&1)
if [[ -n "${diff}" ]]; then
echo "${diff}"
exit 1
fi
#!/usr/bin/env bash
go get golang.org/x/crypto/ssh
go get golang.org/x/tools/cmd/goimports
go vet ./...
./script/format
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册