aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/types/type_test.go
diff options
context:
space:
mode:
authorMichael Matloob <matloob@golang.org>2021-08-24 12:37:15 -0400
committerMichael Matloob <matloob@golang.org>2021-08-25 17:23:06 +0000
commitde23549a3967ade982d848a5b6ae3cb3fa0dba45 (patch)
treeb176a2f18b79f6829fd56ecfb11e84d66a0cdf03 /src/cmd/compile/internal/types/type_test.go
parent3b523caf4145c2d915c5ead69440f9b890634587 (diff)
downloadgo-de23549a3967ade982d848a5b6ae3cb3fa0dba45.tar.gz
go-de23549a3967ade982d848a5b6ae3cb3fa0dba45.zip
[dev.cmdgo] cmd/go: fix calls to modFileGoVersion to pass in modFile
Before this change, we were arbitrarily picking a module to get the Go version from in calls to modFileGoVersion. We now pass in the modFile to modFileGoVersion when we have the file. Most of the calls were to get the goVersion argument for commitRequirements, so now we have commitRequirements call modFileGoVersion on the modFile directly One of the calls to commitRequirements (when running go mod tidy with a different Go version) passed in a new go version to update the file to. Now, the modFile is updated before calling commitRequirements. For the remaining cases of modFileGoVersion, it's replaced by a call to the new (*MainModuleSet).GoVersion function, which either returns the go version on the workspace file (in workspace mode) or the version of the single go.mod file. Change-Id: Ie88c3ca76c7f29ffc4faa16bb76f6cb7eccb5029 Reviewed-on: https://go-review.googlesource.com/c/go/+/344749 Trust: Michael Matloob <matloob@golang.org> Run-TryBot: Michael Matloob <matloob@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
Diffstat (limited to 'src/cmd/compile/internal/types/type_test.go')
0 files changed, 0 insertions, 0 deletions