aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/internal/modcmd/mod.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2018-07-25 00:24:13 -0400
committerRuss Cox <rsc@golang.org>2018-08-01 00:35:16 +0000
commit16962faf998a2f84793c5ca8481f6686ae9e3024 (patch)
tree327ddd45cd12c0961673b77e969538cb2b96fbb5 /src/cmd/go/internal/modcmd/mod.go
parent740e589bd00e330ac38e5aa146961f0d49ff1871 (diff)
downloadgo-16962faf998a2f84793c5ca8481f6686ae9e3024.tar.gz
go-16962faf998a2f84793c5ca8481f6686ae9e3024.zip
cmd/go: add 'go version' statement in go.mod
We aren't planning to use this or advertise it much yet, but having support for it now will make it easier to start using in the future - older go commands will understand what 'go 1.20' means and that they don't have go 1.20. Fixes #23969. Change-Id: I729130b2690d3c0b794b49201526b53de5093c45 Reviewed-on: https://go-review.googlesource.com/125940 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
Diffstat (limited to 'src/cmd/go/internal/modcmd/mod.go')
-rw-r--r--src/cmd/go/internal/modcmd/mod.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cmd/go/internal/modcmd/mod.go b/src/cmd/go/internal/modcmd/mod.go
index 2c0dfb1458..fa6e17cd68 100644
--- a/src/cmd/go/internal/modcmd/mod.go
+++ b/src/cmd/go/internal/modcmd/mod.go
@@ -51,6 +51,8 @@ To override this guess, use the -module flag.
The -module flag changes (or, with -init, sets) the module's path
(the go.mod file's module line).
+The -go flag changes the minimum required version of Go listed in go.mod.
+
The -require=path@version and -droprequire=path flags
add and drop a requirement on the given module path and version.
Note that -require overrides any existing requirements on path.