Hooking into Dialer.DialContext()


(gobiker) #1

I’m looking into adding some custom logic to net::Dialer.DialContext(). How do I go about adding some logic here - https://github.com/golang/go/blob/master/src/net/dial.go#L402. More specifically I would like to continue from there based on the final IP address that is being resolved.

I don’t want to reuse the existing DialContext() in this new function since that would result in two DNS resolutions.