代码拉取完成,页面将自动刷新
#!/bin/sh
set -e
GOMAXPROCS=1 go test -timeout 90s ./...
if [ "$GOARCH" = "amd64" ] || [ "$GOARCH" = "arm64" ]; then
# go test: -race is only supported on linux/amd64, linux/ppc64le,
# linux/arm64, freebsd/amd64, netbsd/amd64, darwin/amd64 and windows/amd64
GOMAXPROCS=4 go test -timeout 90s -race ./...
fi
# no tests, but a build is something
for dir in apps/*/ bench/*/; do
dir=${dir%/}
if grep -q '^package main$' $dir/*.go 2>/dev/null; then
echo "building $dir"
go build -o $dir/$(basename $dir) ./$dir
else
echo "(skipped $dir)"
fi
done
# disable "composite literal uses unkeyed fields"
go vet -composites=false ./...
FMTDIFF="$(find apps internal nsqd nsqlookupd -name '*.go' -exec gofmt -d '{}' ';')"
if [ -n "$FMTDIFF" ]; then
printf '%s\n' "$FMTDIFF"
exit 1
fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。