diff options
author | Austin Clements <austin@google.com> | 2021-04-06 17:04:52 -0400 |
---|---|---|
committer | Austin Clements <austin@google.com> | 2021-04-08 02:17:22 +0000 |
commit | 5159c836410535fad0ae0b23329ef91347c1b133 (patch) | |
tree | 6fc8620fc13072f375f86388d955849989746671 /src/internal | |
parent | a8e55538af40905961c263d980760b76e9c43593 (diff) | |
download | go-5159c836410535fad0ae0b23329ef91347c1b133.tar.gz go-5159c836410535fad0ae0b23329ef91347c1b133.zip |
runtime,cmd/link: include GOEXPERIMENTs in runtime.Version(), "go version X"
This adds the set of GOEXPERIMENTs to the build version if it differs
from the default set of experiments. This exposes the experiment
settings via runtime.Version() and "go version <binary>".
Change-Id: I143dbbc50f66a4cf175469199974e18848075af6
Reviewed-on: https://go-review.googlesource.com/c/go/+/307820
Trust: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/internal')
-rw-r--r-- | src/internal/goexperiment/flags.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/internal/goexperiment/flags.go b/src/internal/goexperiment/flags.go index 1c513d5a70..4803fabe28 100644 --- a/src/internal/goexperiment/flags.go +++ b/src/internal/goexperiment/flags.go @@ -26,6 +26,9 @@ // In the toolchain, the set of experiments enabled for the current // build should be accessed via objabi.Experiment. // +// The set of experiments is included in the output of runtime.Version() +// and "go version <binary>" if it differs from the default experiments. +// // For the set of experiments supported by the current toolchain, see // go doc internal/experiment.Flags. package goexperiment |