diff options
author | Bryan C. Mills <bcmills@google.com> | 2021-05-14 23:14:22 -0400 |
---|---|---|
committer | Bryan C. Mills <bcmills@google.com> | 2021-05-24 15:03:10 +0000 |
commit | 05819bc104c3021d20ad21aa685fb6b4db35ceb0 (patch) | |
tree | e78605225a7dbb778e3ae472ed51ad6db99b1b24 /src/cmd/go/internal/modload/modfile.go | |
parent | cca23a73733ff166722c69359f0bb45e12ccaa2b (diff) | |
download | go-05819bc104c3021d20ad21aa685fb6b4db35ceb0.tar.gz go-05819bc104c3021d20ad21aa685fb6b4db35ceb0.zip |
cmd/go/internal/modcmd: factor out a type for flags whose arguments are Go versions
For #46141
Updates #45094
Change-Id: I6553600c69273762a81795ef021c66f4e0872b6b
Reviewed-on: https://go-review.googlesource.com/c/go/+/321069
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Diffstat (limited to 'src/cmd/go/internal/modload/modfile.go')
-rw-r--r-- | src/cmd/go/internal/modload/modfile.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/go/internal/modload/modfile.go b/src/cmd/go/internal/modload/modfile.go index bafff3e080..a9c3a91d35 100644 --- a/src/cmd/go/internal/modload/modfile.go +++ b/src/cmd/go/internal/modload/modfile.go @@ -55,7 +55,7 @@ var modFile *modfile.File // in modFile are intepreted, or the latest Go version if modFile is nil. func modFileGoVersion() string { if modFile == nil { - return latestGoVersion() + return LatestGoVersion() } if modFile.Go == nil || modFile.Go.Version == "" { // The main module necessarily has a go.mod file, and that file lacks a |