Go version
go version go1.22.4 linux/amd64
Output of go env
in your module/workspace:
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/lkurta/.cache/go-build'
GOENV='/home/lkurta/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/lkurta/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/lkurta/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.22.4'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/dev/null'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build4069208939=/tmp/go-build -gno-record-gcc-switches'
What did you do?
go clean -h
command was issued and the output was not enough informative
What did you see happen?
The output is:
usage: go clean [clean flags] [build flags] [packages]
Run 'go help clean' for details.
The [clean flags]
part is not enough meaningful, and it is proposed to be modified to
go clean [-i] [-r] [-cache] [-testcache] [-modcache] [-fuzzcache] [build flags] [packages]
Run ' go help clean' for details
by @ianlancetaylor here: https://groups.google.com/g/golang-nuts/c/VENQ0fqLCSc/m/qO8EuawVBwAJ
What did you expect to see?
The expected output is:
go clean [-i] [-r] [-cache] [-testcache] [-modcache] [-fuzzcache] [build flags] [packages]
Run ' go help clean' for details
Comment From: gabyhelp
Related Issues
- cmd/go: clean -cache -n should not delete cache #39250 (closed)
- cmd/go: clean -n -cache should only print cache removal commands, not run them #27469 (closed)
- cmd/go: go clean should not accept flags like -modcache with packages #53725 (closed)
- "go clean -modcache" shouldn't need to "find" anything #30480 (closed)
- cmd/go: go clean fails in case of no Go source and enabling Go Modules #31002
- cmd/go: add a way to query for non-defaults in the env #34208 (closed)
- go clean #57220 (closed)
- cmd/go: cache is not aware of go build -trimpath flag #31896 (closed)
- cmd/go: go env -changed prints changed values for variables in go.env #67542 (closed)
- go clean #36248 (closed)
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
Comment From: gopherbot
Change https://go.dev/cl/595757 mentions this issue: cmd/go: making the output of the go clean -h command more informative
Comment From: qrtalaci
@adonese with https://go.dev/cl/593639 has already taken care of it.