Skip to content

net: add mechanism to dump DNS strategy #11322

@bradfitz

Description

@bradfitz

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions