]> Cypherpunks.ru repositories - gostls13.git/commit
go/build/constraint: add GoVersion
authorRuss Cox <rsc@golang.org>
Mon, 13 Mar 2023 21:23:13 +0000 (17:23 -0400)
committerGopher Robot <gobot@golang.org>
Tue, 11 Apr 2023 19:39:51 +0000 (19:39 +0000)
commit830f54b70ed2ce0c28c8db30876aba67beed7ee3
treea1fce3b2e2dc1e8aed14fcf2035275f54690ceed
parenteb57c09054e7a0910202db0000b48419bc96d0ea
go/build/constraint: add GoVersion

For #57001, programs need to be able to deduce the Go version
implied by a given build constraint. GoVersion determines that,
by discarding all build tags other than Go versions and computing
the minimum Go version implied by the resulting expression.

For #59033.

Change-Id: Ifb1e7af2bdbdf172f82aa490c826c9b6ca5e824b
Reviewed-on: https://go-review.googlesource.com/c/go/+/476275
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
api/next/59033.txt [new file with mode: 0644]
src/cmd/dist/buildtool.go
src/go/build/constraint/vers.go [new file with mode: 0644]
src/go/build/constraint/vers_test.go [new file with mode: 0644]