• Brad Fitzpatrick's avatar
    net: add mechanisms to force go or cgo lookup, and to debug default strategy · b615ad8f
    Brad Fitzpatrick authored
    GODEBUG=netdns=1 prints a one-time strategy decision. (cgo or go DNS lookups)
    GODEBUG=netdns=2 prints the per-lookup strategy as a function of the hostname.
    
    The new "netcgo" build tag forces cgo DNS lookups.
    
    GODEBUG=netdns=go (or existing build tag "netgo") forces Go DNS resolution.
    GODEBUG=netdns=cgo (or new build tag "netcgo") forces libc DNS resolution.
    
    Options can be combined with e.g. GODEBUG=netdns=go+1 or GODEBUG=netdns=2+cgo.
    
    Fixes #11322
    Fixes #11450
    
    Change-Id: I7a67e9f759fd0a02320e7803f9ded1638b19e861
    Reviewed-on: https://go-review.googlesource.com/11584Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    b615ad8f
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...