]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/modload: fix bug in error message
authorMichael Matloob <matloob@golang.org>
Thu, 23 May 2024 19:00:49 +0000 (15:00 -0400)
committerMichael Matloob <matloob@golang.org>
Fri, 24 May 2024 15:54:40 +0000 (15:54 +0000)
commit378c48df3b485da1ed287f59e5d1f59ad232e554
treeb404a8e210643f659cb2b29f867f8fbf2626b78b
parent2785f4fad60a3cdee2edc1efbe860b8ccba519cc
cmd/go/internal/modload: fix bug in error message

CL 513756 moved the usage of modGo after it was set to its proper value,
so the error message text always listed the version of go as
"unspecified". Fix the error message in the case where the version was
set in the go.mod, and provide an error message where it wasn't.

Fixes #67587

Change-Id: I763f6be7ee811da32fcb7e785682fd6f48145981
Reviewed-on: https://go-review.googlesource.com/c/go/+/588075
Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/go/internal/modload/init.go
src/cmd/go/testdata/script/list_buildmod_reason_issue67587.txt [new file with mode: 0644]