The Go command had a behavior of writing its own toolchain name when updating the go line in a go.mod (for example when a user runs go get go@version). This behavior was often undesirable and the toolchain line was often removed by users before checking in go.mod files (including in the x/ repos). It also led to user confusion. This change removes that behavior. A toolchain line will not be added if one wasn't present before. The toolchain line can still be removed though: the toolchain line must be at least the go version, so if the go version is increased above the toolchain version, the toolchain version will be bumped up to that go version. Then the toolchain line will then be dropped because go <version> implies toolchain <version>. Making this change slightly hurts reproducability because future go commands run on the go.mod file may be run with a different toolchain than the one that used it, but that doesn't seem to be worth the confusion the behavior resulted in. We expect this change will not have negative consequences, but it could be possible, and we would like to hear from any users that depended on the previous behavior in case we need to roll it back before the release. Fixes #65847 Change-Id: Id795b7f762e4f90ba0fa8c7935d03f32dfc8590e Reviewed-on: https://go-review.googlesource.com/c/go/+/656835 Reviewed-by: Alan Donovan <adonovan@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> |
||
|---|---|---|
| .github | ||
| api | ||
| doc | ||
| lib | ||
| misc | ||
| src | ||
| test | ||
| .gitattributes | ||
| .gitignore | ||
| CONTRIBUTING.md | ||
| LICENSE | ||
| PATENTS | ||
| README.md | ||
| SECURITY.md | ||
| codereview.cfg | ||
| go.env | ||
README.md
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 Attribution 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.