1
0
mirror of https://github.com/golang/go synced 2024-11-14 22:30:26 -07:00

net: improve documentation of netgo/netcgo build tags

Updates #69680

Change-Id: If80d43da493cb035164ede4a2cadcbec5831feaf
GitHub-Last-Rev: b3853e9487
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>
This commit is contained in:
Mateusz Poliwczak 2024-09-27 19:20:58 +00:00 committed by Gopher Robot
parent 2bffb8b3fb
commit 869932d700

View File

@ -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.