Skip to content

Commit 869932d

Browse files
mateusz834gopherbot
authored andcommitted
net: improve documentation of netgo/netcgo build tags
Updates #69680 Change-Id: If80d43da493cb035164ede4a2cadcbec5831feaf GitHub-Last-Rev: b3853e9 GitHub-Pull-Request: #69682 Reviewed-on: https://go-review.googlesource.com/c/go/+/616262 Auto-Submit: Ian Lance Taylor <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Michael Knyszek <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 2bffb8b commit 869932d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/net/net.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ GODEBUG environment variable (see package runtime) to go or cgo, as in:
6868
6969
The decision can also be forced while building the Go source tree
7070
by setting the netgo or netcgo build tag.
71+
The netgo build tag disables entirely the use of the native (CGO) resolver,
72+
meaning the Go resolver is the only one that can be used.
73+
With the netcgo build tag the native and the pure Go resolver are compiled into the binary,
74+
but the native (CGO) resolver is preferred over the Go resolver.
75+
With netcgo, the Go resolver can still be forced at runtime with GODEBUG=netdns=go.
7176
7277
A numeric netdns setting, as in GODEBUG=netdns=1, causes the resolver
7378
to print debugging information about its decisions.

0 commit comments

Comments
 (0)