Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../proc/self/root/lib/golang/src
File: README.vendor
Vendoring in std and cmd
[0] Fix | Delete
========================
[1] Fix | Delete
[2] Fix | Delete
The Go command maintains copies of external packages needed by the
[3] Fix | Delete
standard library in the src/vendor and src/cmd/vendor directories.
[4] Fix | Delete
[5] Fix | Delete
There are two modules, std and cmd, defined in src/go.mod and
[6] Fix | Delete
src/cmd/go.mod. When a package outside std or cmd is imported
[7] Fix | Delete
by a package inside std or cmd, the import path is interpreted
[8] Fix | Delete
as if it had a "vendor/" prefix. For example, within "crypto/tls",
[9] Fix | Delete
an import of "golang.org/x/crypto/cryptobyte" resolves to
[10] Fix | Delete
"vendor/golang.org/x/crypto/cryptobyte". When a package with the
[11] Fix | Delete
same path is imported from a package outside std or cmd, it will
[12] Fix | Delete
be resolved normally. Consequently, a binary may be built with two
[13] Fix | Delete
copies of a package at different versions if the package is
[14] Fix | Delete
imported normally and vendored by the standard library.
[15] Fix | Delete
[16] Fix | Delete
Vendored packages are internally renamed with a "vendor/" prefix
[17] Fix | Delete
to preserve the invariant that all packages have distinct paths.
[18] Fix | Delete
This is necessary to avoid compiler and linker conflicts. Adding
[19] Fix | Delete
a "vendor/" prefix also maintains the invariant that standard
[20] Fix | Delete
library packages begin with a dotless path element.
[21] Fix | Delete
[22] Fix | Delete
The module requirements of std and cmd do not influence version
[23] Fix | Delete
selection in other modules. They are only considered when running
[24] Fix | Delete
module commands like 'go get' and 'go mod vendor' from a directory
[25] Fix | Delete
in GOROOT/src.
[26] Fix | Delete
[27] Fix | Delete
Maintaining vendor directories
[28] Fix | Delete
==============================
[29] Fix | Delete
[30] Fix | Delete
Before updating vendor directories, ensure that module mode is enabled.
[31] Fix | Delete
Make sure that GO111MODULE is not set in the environment, or that it is
[32] Fix | Delete
set to 'on' or 'auto'.
[33] Fix | Delete
[34] Fix | Delete
Requirements may be added, updated, and removed with 'go get'.
[35] Fix | Delete
The vendor directory may be updated with 'go mod vendor'.
[36] Fix | Delete
A typical sequence might be:
[37] Fix | Delete
[38] Fix | Delete
cd src
[39] Fix | Delete
go get golang.org/x/net@master
[40] Fix | Delete
go mod tidy
[41] Fix | Delete
go mod vendor
[42] Fix | Delete
[43] Fix | Delete
Use caution when passing '-u' to 'go get'. The '-u' flag updates
[44] Fix | Delete
modules providing all transitively imported packages, not only
[45] Fix | Delete
the module providing the target package.
[46] Fix | Delete
[47] Fix | Delete
Note that 'go mod vendor' only copies packages that are transitively
[48] Fix | Delete
imported by packages in the current module. If a new package is needed,
[49] Fix | Delete
it should be imported before running 'go mod vendor'.
[50] Fix | Delete
[51] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function