]> Cypherpunks repositories - gostls13.git/commit
cmd/go: add subdirectory support to go-import meta tag
authorSam Thanawalla <samthanawalla@google.com>
Tue, 29 Oct 2024 14:22:11 +0000 (14:22 +0000)
committerGopher Robot <gobot@golang.org>
Thu, 10 Apr 2025 18:14:09 +0000 (11:14 -0700)
commit835e36fc7f631f74233edfd4ab43b6b56833db86
treef0e503f06dd5f9dc4345bf02c0088561c17dac68
parent2c35900fe4256d6de132cbee6f5a15b29013aac9
cmd/go: add subdirectory support to go-import meta tag

This CL adds ability to specify a subdirectory in the go-import meta tag.
A go-import meta tag now will support:
<meta name="go-import" content="root-path vcs repo-url subdir">

Fixes: #34055
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest
Change-Id: Iedac520f97e0646254cc1bd2f97d5a9a5236829b
Reviewed-on: https://go-review.googlesource.com/c/go/+/625577
Reviewed-by: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Sam Thanawalla <samthanawalla@google.com>
14 files changed:
src/cmd/go/alldocs.go
src/cmd/go/internal/help/helpdoc.go
src/cmd/go/internal/modfetch/coderepo.go
src/cmd/go/internal/modfetch/coderepo_test.go
src/cmd/go/internal/modfetch/repo.go
src/cmd/go/internal/vcs/discovery.go
src/cmd/go/internal/vcs/discovery_test.go
src/cmd/go/internal/vcs/vcs.go
src/cmd/go/internal/vcs/vcs_test.go
src/cmd/go/testdata/script/mod_get_subdir.txt [new file with mode: 0644]
src/cmd/go/testdata/vcstest/git/gitreposubdir.txt [new file with mode: 0644]
src/cmd/go/testdata/vcstest/git/gitreposubdirv2.txt [new file with mode: 0644]
src/cmd/go/testdata/vcstest/go/gitreposubdir.txt [new file with mode: 0644]
src/cmd/go/testdata/vcstest/go/gitreposubdirv2.txt [new file with mode: 0644]