]> Cypherpunks repositories - gostls13.git/commit
cmd/go: make go line declare minimum required Go version
authorRuss Cox <rsc@golang.org>
Mon, 13 Mar 2023 17:22:34 +0000 (13:22 -0400)
committerGopher Robot <gobot@golang.org>
Fri, 14 Apr 2023 16:08:34 +0000 (16:08 +0000)
commit4bd20ec884876816e8f011aea931f7b6846c3a4c
treed4f43843699185b2b6defeb233af8eefba472952
parent804d786a30c664df63ef1e0c95d44772063afae1
cmd/go: make go line declare minimum required Go version

For #57001, enforce the go line as declaring the minimum required
version of Go that can compile a module.

Modules that maintain compatibility with old versions of Go
but want to make use of new features in //go:build-constrained files
will be able to do so: the //go:build constraint will be interpreted
as changing the minimum Go version for that file and will unlock
the Go features allowed in that version.

Change-Id: Ibeeb7c93ce7ea2e5187d78af0757cbfac19484a0
Reviewed-on: https://go-review.googlesource.com/c/go/+/476279
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Russ Cox <rsc@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
src/cmd/go/internal/work/exec.go
src/cmd/go/testdata/script/mod_go_version.txt