net: add mechanism to dump DNS strategy #11322
In Go 1.5, the net package will prefer to do its own DNS lookups, rather than using cgo if the nsswitch.conf and resolv.conf files (which are now parsed) permit.
Users will inevitably find problems with DNS resolution (as they have in every release in the past: whether it's with fd exhaustion, or the results themselves), and we'll need a way to debug which of the two paths users' code is going. We don't have such a mechanism now.
Perhaps a GODEBUG environment variable key ("GODEBUG=netdns=1") which causes the net package to print its decisions about how it'll do DNS, at least the first time.
The text was updated successfully, but these errors were encountered: