Skip to content

Commit

Permalink
doc/go1.22: document workspace vendoring
Browse files Browse the repository at this point in the history
For golang#61422.
Updates golang#60056.

Change-Id: Ie7c7e12acc173f1ff1644555016e51a52509bd6d
Reviewed-on: https://go-review.googlesource.com/c/go/+/548815
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
  • Loading branch information
Bryan C. Mills authored and ezz-no committed Feb 17, 2024
1 parent c580a6b commit 3d689ed
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion doc/go1.22.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,20 @@ <h3 id="go-command">Go command</h3>

<!-- https://go.dev/issue/60056 -->
<p>
<!-- support vendoring in workspace mode -->
Commands in <a href="https://go.dev/ref/mod#workspaces">workspaces</a> can now
use a <code>vendor</code> directory containing the dependencies of the
workspace. The directory is created by
<a href="/pkg/cmd/go#hdr-Make_vendored_copy_of_dependencies"><code>go</code> <code>work</code> <code>vendor</code></a>,
and used by build commands when the <code>-mod</code> flag is set to
<code>vendor</code>, which is the default when a workspace <code>vendor</code>
directory is present.
</p>
<p>
Note that the <code>vendor</code> 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 <code>vendor</code> directory
can contain the dependencies of either the workspace or of the module,
but not both.
</p>

<!-- CL 518775 -->
Expand Down

0 comments on commit 3d689ed

Please sign in to comment.