dist clean has logic to delete command binaries from the cmd directories in cleanlist. However, these days the only binary it could possibly remove is "$GOROOT/src/cmd/cgo/cgo". This is clearly no longer necessary, so remove this stale code. When this logic was originally introduced in CL 5622058, it was driven by cleantab (not cleanlist), which contained all of the cmd directories, which were legion at the time because this was the era of the [568][acgl] toolchain. CL 9154 deleted cleantab, and did the same clean walk over the "cmd/" directories listed in buildorder. However, buildorder was a list of packages necessary to build cmd/go, so the only "cmd/" directory in buildorder at the time was "cmd/go". Hence, at that CL, dist started deleting only a "$GOROOT/src/cmd/go/go" binary. The modern cleanlist was introduced in CL 76021, as a list of packages containing "generated files and commands". The only "cmd/" directory in cleanlist the whole time has been "cmd/cgo" (and I'm honestly not sure why cmd/cgo is in there), so since that CL dist has only deleted "$GOROOT/src/cmd/cgo/cgo". Change-Id: I1915eb938d1a0e22ae6a64e7648a21894d3e6502 Reviewed-on: https://go-review.googlesource.com/c/go/+/501136 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
The Go Programming Language
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 4.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Download and Install
Binary Distributions
Official binary distributions are available at https://go.dev/dl/.
After downloading a binary release, visit https://go.dev/doc/install for installation instructions.
Install From Source
If a binary distribution is not available for your combination of operating system and architecture, visit https://go.dev/doc/install/source for source installation instructions.
Contributing
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://go.dev/doc/contribute.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://go.dev/wiki/Questions for a list of places to ask questions about the Go language.