diff options
author | Ian Lance Taylor <iant@golang.org> | 2022-12-31 13:11:35 -0800 |
---|---|---|
committer | Gopher Robot <gobot@golang.org> | 2023-01-03 20:31:59 +0000 |
commit | 9955a7e9bb40d28502fbb8fd6ef1f2f10e18a519 (patch) | |
tree | ee03f7faa31244053074931f598ea49096182957 | |
parent | d03231d9ce361a154e0f9775f9bc036241d3b381 (diff) | |
download | go-git-9955a7e9bb40d28502fbb8fd6ef1f2f10e18a519.tar.gz |
README.vendor: minor updates
Change-Id: Iaacc96e6302833019ebf7a82d5a1ae49f6ff1955
Reviewed-on: https://go-review.googlesource.com/c/go/+/460175
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
-rw-r--r-- | src/README.vendor | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/README.vendor b/src/README.vendor index e74fc2f316..4b6bdb8e74 100644 --- a/src/README.vendor +++ b/src/README.vendor @@ -4,12 +4,8 @@ Vendoring in std and cmd The Go command maintains copies of external packages needed by the standard library in the src/vendor and src/cmd/vendor directories. -In GOPATH mode, imports of vendored packages are resolved to these -directories following normal vendor directory logic -(see golang.org/s/go15vendor). - -In module mode, std and cmd are modules (defined in src/go.mod and -src/cmd/go.mod). When a package outside std or cmd is imported +There are two modules, std and cmd, defined in src/go.mod and +src/cmd/go.mod. When a package outside std or cmd is imported by a package inside std or cmd, the import path is interpreted as if it had a "vendor/" prefix. For example, within "crypto/tls", an import of "golang.org/x/crypto/cryptobyte" resolves to @@ -34,14 +30,15 @@ Maintaining vendor directories ============================== Before updating vendor directories, ensure that module mode is enabled. -Make sure GO111MODULE=off is not set ('on' or 'auto' should work). +Make sure that GO111MODULE is not set in the environment, or that it is +set to 'on' or 'auto'. Requirements may be added, updated, and removed with 'go get'. The vendor directory may be updated with 'go mod vendor'. A typical sequence might be: cd src - go get -d golang.org/x/net@latest + go get golang.org/x/net@latest go mod tidy go mod vendor |