]> Cypherpunks repositories - gostls13.git/commitdiff
net: improve documentation of netgo/netcgo build tags
authorMateusz Poliwczak <mpoliwczak34@gmail.com>
Fri, 27 Sep 2024 19:20:58 +0000 (19:20 +0000)
committerGopher Robot <gobot@golang.org>
Mon, 30 Sep 2024 12:38:42 +0000 (12:38 +0000)
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>
src/net/net.go

index f8b5834acba56a9a8101be3ae35fde1843cc7ade..82dc222de1e75b3d4e92322acf2ecf2c4d1f3f57 100644 (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.