]> Cypherpunks repositories - gostls13.git/commit
cmd/go: skip over all workspace modules in go mod verify
authorMichael Matloob <matloob@golang.org>
Mon, 17 Apr 2023 20:42:18 +0000 (16:42 -0400)
committerMichael Matloob <matloob@golang.org>
Tue, 18 Apr 2023 19:49:40 +0000 (19:49 +0000)
commitfd786a550a0ca004725cba2f49fd8ee86ef22b10
treea0a4b4355401fee1f32b86d2b932f6b2a4e098b0
parent903a25ae118b5f9bb0aacf7969dd637480185bd6
cmd/go: skip over all workspace modules in go mod verify

This was a remaining place where we made the assumption that there is
only one workspace module. So we'd only skip the first workspace
module when running go mod verify. Instead skip over the first
MainModules.Len() modules of the buildlist, which are all the main
modules.

Fixes #54372

Change-Id: Ife687c907ae4326759c43cc35f78d429d5113b19
Reviewed-on: https://go-review.googlesource.com/c/go/+/485475
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
Run-TryBot: Michael Matloob <matloob@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
src/cmd/go/internal/modcmd/verify.go
src/cmd/go/internal/modload/buildlist.go
src/cmd/go/testdata/script/work_issue54372.txt [new file with mode: 0644]