-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net: there should be a net.ResolveAddr() function #5133
Labels
Milestone
Comments
I think API surface is fine but I'm afraid this API will have the same issue which existing ResolveProtocolAddr API has, that is that how could we select an appropriate address for any purposes without any preferences such as a target/destination address, routing information, etc when the user passes a DNS reg. name instead of a literal IP address. |
My initial report referred to the API of an intermediate version of the net package. The current API is that to customize aspects of net.Dial() you create a net.Dialer struct with a LocalAddr member then call its .Dial(). But you're still on your own to create a suitable net.Addr address for the LocalAddr member. (Hopefully this makes sense now.) |
Does net.Resolver in Go 1.8 solve this? If not, please file a new bug about what's tedious to do with Go 1.8 (with sample code) and reference this bug in your new bug report. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: