From 3d689edb20a0f50d12d55527f2080f2501a46c4e Mon Sep 17 00:00:00 2001 From: "Bryan C. Mills" Date: Mon, 11 Dec 2023 11:29:36 -0500 Subject: [PATCH] doc/go1.22: document workspace vendoring For #61422. Updates #60056. Change-Id: Ie7c7e12acc173f1ff1644555016e51a52509bd6d Reviewed-on: https://go-review.googlesource.com/c/go/+/548815 Auto-Submit: Bryan Mills Reviewed-by: Michael Matloob LUCI-TryBot-Result: Go LUCI --- doc/go1.22.html | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/doc/go1.22.html b/doc/go1.22.html index 414f30e6fb4d4e..631184a0e802c9 100644 --- a/doc/go1.22.html +++ b/doc/go1.22.html @@ -67,7 +67,20 @@

Go command

- + Commands in workspaces can now + use a vendor directory containing the dependencies of the + workspace. The directory is created by + go work vendor, + and used by build commands when the -mod flag is set to + vendor, which is the default when a workspace vendor + directory is present. +

+

+ Note that the vendor directory's contents for a workspace are different + from those of a single module: if the directory at the root of a workspace also + contains one of the modules in the workspace, its vendor directory + can contain the dependencies of either the workspace or of the module, + but not both.