1
0
mirror of https://github.com/golang/go synced 2024-09-29 02:24:33 -06:00
go/src
Cherry Mui 45320c23f2 all: rename GOEXPERIMENT=range to rangefunc
Range over integer is enabled now without the GOEXPERIMENT. The
GOEXPERIMENT is only for range over func. Rename it to rangefunc.

For #61405.

Change-Id: I9405fb8e2e30827875716786823856090a1a0cad
Reviewed-on: https://go-review.googlesource.com/c/go/+/539277
Reviewed-by: Russ Cox <rsc@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2023-11-08 15:32:14 +00:00
..
archive
arena
bufio bufio: allow terminating Scanner early cleanly without a final token or an error 2023-10-23 09:06:30 +00:00
builtin
bytes bytes,internal/bytealg: add func bytealg.LastIndexRabinKarp 2023-11-01 19:02:57 +00:00
cmd all: rename GOEXPERIMENT=range to rangefunc 2023-11-08 15:32:14 +00:00
cmp
compress
container
context
crypto boring: update documentation to include arm64 2023-11-07 05:28:51 +00:00
database/sql database/sql: add godoc links 2023-10-23 09:04:12 +00:00
debug debug/elf,cmd/link: add additional relocations for loong64 2023-11-02 19:46:03 +00:00
embed
encoding
errors errors: add available godoc link 2023-11-02 19:45:41 +00:00
expvar
flag
fmt
go all: rename GOEXPERIMENT=range to rangefunc 2023-11-08 15:32:14 +00:00
hash hash/maphash: weaken avalanche test a bit more 2023-10-31 17:00:31 +00:00
html
image
index/suffixarray
internal all: rename GOEXPERIMENT=range to rangefunc 2023-11-08 15:32:14 +00:00
io
log log/slog: Reorder doc comment for level constants 2023-10-30 17:34:43 +00:00
maps
math math/rand/v2: delete Mitchell/Reeds source 2023-10-30 17:09:26 +00:00
mime
net net/url: use quick path in URL.Encode() on empty map 2023-11-07 22:01:35 +00:00
os os/signal: skip nohup tests on darwin builders 2023-11-02 17:31:41 +00:00
path path/filepath: fix various issues in parsing Windows paths 2023-11-07 16:29:18 +00:00
plugin plugin: add available godoc link 2023-11-06 19:46:10 +00:00
reflect reflect: pass the right element type in verifyGCBitsSlice 2023-11-02 17:24:08 +00:00
regexp
runtime runtime/internal/atomic: add arm/arm64 operators for And/Or 2023-11-07 17:27:06 +00:00
slices
sort all: drop old +build lines 2023-10-19 23:33:27 +00:00
strconv all: drop old +build lines 2023-10-19 23:33:27 +00:00
strings
sync
syscall syscall: provide and use ioctlPtr for all BSD platforms 2023-11-07 10:34:48 +00:00
testdata
testing testing: correct comments on runCleanup 2023-11-06 18:01:18 +00:00
text
time
unicode unicode: add available godoc link 2023-11-06 20:02:46 +00:00
unsafe
vendor net/http: pull http2 underflow fix from x/net/http2 2023-10-26 15:35:15 +00:00
all.bash
all.bat
all.rc
bootstrap.bash
buildall.bash
clean.bash
clean.bat
clean.rc
cmp.bash
go.mod net/http: pull http2 underflow fix from x/net/http2 2023-10-26 15:35:15 +00:00
go.sum net/http: pull http2 underflow fix from x/net/http2 2023-10-26 15:35:15 +00:00
make.bash
make.bat
Make.dist
make.rc
race.bash
race.bat
README.vendor
run.bash
run.bat
run.rc

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.

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
"vendor/golang.org/x/crypto/cryptobyte". When a package with the
same path is imported from a package outside std or cmd, it will
be resolved normally. Consequently, a binary may be built with two
copies of a package at different versions if the package is
imported normally and vendored by the standard library.

Vendored packages are internally renamed with a "vendor/" prefix
to preserve the invariant that all packages have distinct paths.
This is necessary to avoid compiler and linker conflicts. Adding
a "vendor/" prefix also maintains the invariant that standard
library packages begin with a dotless path element.

The module requirements of std and cmd do not influence version
selection in other modules. They are only considered when running
module commands like 'go get' and 'go mod vendor' from a directory
in GOROOT/src.

Maintaining vendor directories
==============================

Before updating vendor directories, ensure that module mode is enabled.
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 golang.org/x/net@master
    go mod tidy
    go mod vendor

Use caution when passing '-u' to 'go get'. The '-u' flag updates
modules providing all transitively imported packages, not only
the module providing the target package.

Note that 'go mod vendor' only copies packages that are transitively
imported by packages in the current module. If a new package is needed,
it should be imported before running 'go mod vendor'.