diff options
| author | Mateusz Poliwczak <mpoliwczak34@gmail.com> | 2024-09-27 19:20:58 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2024-09-30 12:38:42 +0000 |
| commit | 869932d700cf161c19eec65d66b9fe55482698db (patch) | |
| tree | cc06599bdeac65f6b70e1f1498a3665ea4dbf006 /src/net | |
| parent | 2bffb8b3fb2d9137ccfa87fc35137371b86a2e96 (diff) | |
| download | go-869932d700cf161c19eec65d66b9fe55482698db.tar.xz | |
net: improve documentation of netgo/netcgo build tags
Updates #69680
Change-Id: If80d43da493cb035164ede4a2cadcbec5831feaf
GitHub-Last-Rev: b3853e9487da1006ecece9dd378e3de299d0b1da
GitHub-Pull-Request: golang/go#69682
Reviewed-on: https://go-review.googlesource.com/c/go/+/616262
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/net')
| -rw-r--r-- | src/net/net.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/net/net.go b/src/net/net.go index f8b5834acb..82dc222de1 100644 --- a/src/net/net.go +++ b/src/net/net.go @@ -68,6 +68,11 @@ GODEBUG environment variable (see package runtime) to go or cgo, as in: The decision can also be forced while building the Go source tree by setting the netgo or netcgo build tag. +The netgo build tag disables entirely the use of the native (CGO) resolver, +meaning the Go resolver is the only one that can be used. +With the netcgo build tag the native and the pure Go resolver are compiled into the binary, +but the native (CGO) resolver is preferred over the Go resolver. +With netcgo, the Go resolver can still be forced at runtime with GODEBUG=netdns=go. A numeric netdns setting, as in GODEBUG=netdns=1, causes the resolver to print debugging information about its decisions. |
