]> Cypherpunks.ru repositories - gostls13.git/commit
net: centralize resolver selection logic
authorMateusz Poliwczak <mpoliwczak34@gmail.com>
Sat, 26 Aug 2023 16:43:17 +0000 (16:43 +0000)
committerGopher Robot <gobot@golang.org>
Sat, 26 Aug 2023 22:50:29 +0000 (22:50 +0000)
commit071aed2aaa0ed819582c5bff44b70d43c61f504a
tree923c602bd6062f1aa30b01e720f6517a762a4e61
parentff00fdfdbeeb72ca8981a04290765452d6a31b26
net: centralize resolver selection logic

This change removes the per GOOS hostLookupOrder wrappers.
passes the correct hostname to hostLookupOrder (windows,
plan9), so that the netdns+2 GODEBUG doesn't show empty
hostnames.

Uses the mustUseGoResolver instead of hostLookupOrder,
hostLookupOrder should only be used for hostname resolution,
not for lookups that do only DNS.

Change-Id: I18bbff06957910ae25c2bc78dfa9a46da76529fd
GitHub-Last-Rev: a27545dc25fffb3a51da9d943ffa9bd1a09182ee
GitHub-Pull-Request: golang/go#61525
Reviewed-on: https://go-review.googlesource.com/c/go/+/512215
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Mateusz Poliwczak <mpoliwczak34@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/net/conf.go
src/net/dnsclient_unix.go
src/net/lookup_plan9.go
src/net/lookup_unix.go
src/net/lookup_windows.go