Closed hellojukay closed 4 years ago
go version
go version go1.13.6 linux/amd64
go env
GO111MODULE="on" GOARCH="amd64" GOBIN="" GOCACHE="/home/hellojukay/.cache/go-build" GOENV="/home/hellojukay/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" components,git-biz.qianxin-inc.cn/ats-ng/nspm-2.0" GOOS="linux" GOPATH="/home/hellojukay/go" GOPROXY="https://goproxy.io" GOROOT="/home/hellojukay/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/home/hellojukay/go/pkg/tool/linux_amd64" GCCGO="gccgo" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="0" GOMOD="/dev/null" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build902988545=/tmp/go-build -gno-record-gcc-switches"
go -h | grep build
it should get help usage about build
build compile packages and dependencies buildmode build modes cache build and test caching
build golang print usage to stderr,
go -h echo $? 2
it thank go -h should exit 0
The go command returned -2 because -h is not recognised.
-h
yes , go help exit with 0
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
go -h | grep build
What did you expect to see?
it should get help usage about build
What did you see instead?
build golang print usage to stderr,
it thank go -h should exit 0