update to latest adns, synced with Go's net

This commit is contained in:
Mechiel Lukkien
2024-03-08 15:31:54 +01:00
parent a00b0ba6cd
commit 4fbd7abb57
17 changed files with 187 additions and 85 deletions

13
vendor/github.com/mjl-/adns/conf.go generated vendored
View File

@ -157,7 +157,7 @@ func initConfVal() {
}
}
// goosPreferCgo reports whether the GOOS value passed in prefers
// goosPrefersCgo reports whether the GOOS value passed in prefers
// the cgo resolver.
func goosPrefersCgo() bool {
switch runtime.GOOS {
@ -225,16 +225,7 @@ func (c *conf) lookupOrder(r *Resolver, hostname string) (ret hostLookupOrder, d
// Go resolver was explicitly requested
// or cgo resolver is not available.
// Figure out the order below.
switch c.goos {
case "windows":
// TODO(bradfitz): implement files-based
// lookup on Windows too? I guess /etc/hosts
// kinda exists on Windows. But for now, only
// do DNS.
fallbackOrder = hostLookupDNS
default:
fallbackOrder = hostLookupFilesDNS
}
fallbackOrder = hostLookupFilesDNS
canUseCgo = false
} else if c.netCgo {
// Cgo resolver was explicitly requested.