]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/go/internal/modcmd: do not copy test embed files when vendoring
authorQuan Tong <quantonganh@gmail.com>
Wed, 11 Oct 2023 01:55:24 +0000 (01:55 +0000)
committerGopher Robot <gobot@golang.org>
Wed, 18 Oct 2023 19:30:00 +0000 (19:30 +0000)
commitb78aa6c2e790f5a7405262951cd6a4919f7d315b
treeb169de8b27dd6a4e5d231c02d671655075921b87
parentd580460f07b4e543f5b8f89dd44367e511546787
cmd/go/internal/modcmd: do not copy test embed files when vendoring

Currently, go mod vendor copy all files matched by //go:embed,
even when it is in a _test.go file. According to the documentation,
it should not include test code for vendored packages.

Fixes #63473

Change-Id: I28c411724fc7b7aeb683857fc114e20b08635e01
Reviewed-on: https://go-review.googlesource.com/c/go/+/534376
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
src/cmd/go/internal/modcmd/vendor.go
src/cmd/go/testdata/script/mod_vendor_embed.txt