go/src
Devon Mar 043b9de658 net: parse addresses without separators in ParseMac
IEEE EUI guidelines states that "an EUI-48 can be represented in the IEEE RA
hexadecimal (hex) form with the octets separated by hyphens, or as a pure
base-16 numerical representation without hyphens"
(https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf p.9).
The latter form is used in Azure Instance Metadata Service
(https://github.com/Azure/azure-container-networking/pull/4122) among others.

Fixes #66682

Change-Id: Id66c23d50ebb1fed1f3bdb5cf3822a8fd60b886d
GitHub-Last-Rev: 77900cc1a6
GitHub-Pull-Request: golang/go#76387
Reviewed-on: https://go-review.googlesource.com/c/go/+/722720
Auto-Submit: Damien Neil <dneil@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-12-02 12:42:13 -08:00
..
archive all: remove unnecessary loop variable copies in tests 2025-10-17 13:10:27 -07:00
arena
bufio unicode/utf8: make DecodeRune{,InString} inlineable 2025-09-03 07:04:47 -07:00
builtin
bytes bytes: fix panic in bytes.Buffer.Peek 2025-11-14 11:01:17 -08:00
cmd cmd/compile: more generated equality function tests 2025-12-02 12:32:35 -08:00
cmp cmp: add examples for Compare and Less 2025-03-11 15:22:39 -07:00
compress compress/flate: move big non-pointer arrays to end of compressor 2025-11-25 12:28:05 -08:00
container
context context: don't return the wrong error when Cause races cancellation 2025-11-24 17:02:35 -08:00
crypto crypto/x509: prevent HostnameError.Error() from consuming excessive resource 2025-12-02 12:22:04 -08:00
database/sql database/sql: don't ignore ColumnConverter for unknown input count 2025-11-21 13:25:48 -08:00
debug debug/elf: correct case of DWARF in comment 2025-12-01 09:41:50 -08:00
embed
encoding encoding/json: remove linknames 2025-11-20 14:04:37 -08:00
errors errors: add examples for custom Is/As matching 2025-11-21 12:40:11 -08:00
expvar
flag
fmt fmt: document space behavior of Append 2025-11-27 19:54:18 -08:00
go go/types, types2: remove InvalidTypeCycle from literals.go 2025-11-26 16:20:21 -08:00
hash runtime: use 32-bit hash for maps on Wasm 2025-10-24 12:40:49 -07:00
html html/template: document comment stripping 2025-03-17 08:52:14 -07:00
image cmd/internal/obj/arm64, image/gif, runtime, sort: use math/bits to calculate log2 2025-11-23 03:49:34 -08:00
index/suffixarray
internal internal/runtime/cgroup: remove duplicate readString definition 2025-12-01 13:27:40 -08:00
io io: reduce intermediate allocations in ReadAll and have a smaller final result 2025-11-26 20:45:34 -08:00
iter iter: fix a tiny doc comment bug 2025-11-06 09:34:49 -08:00
log all: replace Split in loops with more efficient SplitSeq 2025-10-23 07:34:31 -07:00
maps maps: use strings.EqualFold in example 2025-11-25 12:24:47 -08:00
math math: switch s390x math.Pow to generic implementation 2025-11-19 13:32:20 -08:00
mime mime: add missing path for mime types in godoc 2025-11-20 13:02:54 -08:00
net net: parse addresses without separators in ParseMac 2025-12-02 12:42:13 -08:00
os os: allow direntries to have zero inodes on Linux 2025-11-26 20:42:22 -08:00
path path: add more examples for path.Clean 2025-11-25 12:25:10 -08:00
plugin
reflect reflect: add iterator equivalents for NumField, NumIn, NumOut and NumMethod 2025-11-25 09:18:42 -08:00
regexp unicode/utf8: make DecodeRune{,InString} inlineable 2025-09-03 07:04:47 -07:00
runtime runtime/internal/testprog: log initial SchedMetrics GOMAXPROCS 2025-12-01 14:59:40 -08:00
simd [dev.simd] simd: add goexperiment tag to generate.go 2025-11-24 11:47:27 -08:00
slices slices: fix incorrect comment in slices.Insert function documentation 2025-11-23 03:35:46 -08:00
sort cmd/internal/obj/arm64, image/gif, runtime, sort: use math/bits to calculate log2 2025-11-23 03:49:34 -08:00
strconv strconv: move all but Quote to internal/strconv 2025-10-29 11:00:02 -07:00
strings all: remove extra space in the comments 2025-11-03 10:05:39 -08:00
structs
sync [dev.simd] all: merge master (57362e9) into dev.simd 2025-11-13 16:54:07 -05:00
syscall os: allow direntries to have zero inodes on Linux 2025-11-26 20:42:22 -08:00
testdata
testing crypto,testing/cryptotest: ignore random io.Reader params, add SetGlobalRandom 2025-11-26 16:01:17 -08:00
text all: correct name for comments 2025-10-17 09:52:21 -07:00
time internal/itoa, internal/runtime/strconv: delete 2025-10-29 11:00:09 -07:00
unicode unicode/utf8: make DecodeRune{,InString} inlineable 2025-09-03 07:04:47 -07:00
unique unique: fix inconsistent panic prefix in canonmap cleanup path 2025-10-23 13:42:09 -07:00
unsafe
vendor all: update vendored dependencies 2025-12-01 08:23:28 -08:00
weak runtime: ensure weak handles end up in their own allocation 2025-11-14 11:15:44 -08:00
all.bash all.{bash,rc}: use "../bin/go tool dist" instead of "%GOTOOLDIR%/dist" print build info 2025-06-10 06:00:41 -07:00
all.bat
all.rc all.{bash,rc}: use "../bin/go tool dist" instead of "%GOTOOLDIR%/dist" print build info 2025-06-10 06:00:41 -07:00
bootstrap.bash
buildall.bash
clean.bash
clean.bat
clean.rc
cmp.bash
go.mod all: update vendored dependencies 2025-12-01 08:23:28 -08:00
go.sum all: update vendored dependencies 2025-12-01 08:23:28 -08:00
make.bash cmd/dist: require Go 1.24.6 as minimum bootstrap toolchain 2025-08-11 14:25:55 -07:00
make.bat cmd/dist: require Go 1.24.6 as minimum bootstrap toolchain 2025-08-11 14:25:55 -07:00
Make.dist
make.rc cmd/dist: require Go 1.24.6 as minimum bootstrap toolchain 2025-08-11 14:25:55 -07:00
race.bash runtime/race: add race detector support for linux/riscv64 2025-08-29 23:57:12 -07:00
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', and if you use a go.work file, set GOWORK=off.

Also, ensure that 'go env GOROOT' shows the root of this Go source
tree. Otherwise, the results are undefined. It's recommended to build
Go from source and use that 'go' binary to update its source tree.

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  # or src/cmd
    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'.