• Matt Harden's avatar
    net: allow Resolver to use a custom dialer · 380aa884
    Matt Harden authored
    In some cases it is desirable to customize the way the DNS server is
    contacted, for instance to use a specific LocalAddr. While most
    operating-system level resolvers do not allow this, we have the
    opportunity to do so with the Go resolver. Most of the code was
    already in place to allow tests to override the dialer. This exposes
    that functionality, and as a side effect eliminates the need for a
    testing hook.
    
    Fixes #17404
    
    Change-Id: I1c5e570f8edbcf630090f8ec6feb52e379e3e5c0
    Reviewed-on: https://go-review.googlesource.com/37260
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    380aa884
lookup_unix.go 5.23 KB