Skip to content
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: Expose net.internetAddrList, net.lookupIPDeadline publicly #11183

Closed
blalor opened this issue Jun 12, 2015 · 2 comments

Comments

Projects
None yet
4 participants
@blalor
Copy link

commented Jun 12, 2015

internetAddrList would be useful for looking up an IP address from a hostname without having to test if the string's already an IP address.

lookupIPDeadline would be useful for looking up an IP address with a specified timeout. I'd generally like to see a way to resolve information from DNS with a timeout, without having to resort to a 3rd-party library.

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Jun 12, 2015

The net API is already far too complex and difficult to understand, so each new addition has to be clearly necessary. Both of these operations can be done already, so it's not clear to me that it's worth adding them to the net package. But I'm happy to hear other opinions.

(You don't need a third party library to lookup a DNS entry with a timeout, you just need a goroutine and a channel.)

@ianlancetaylor ianlancetaylor changed the title Expose net.internetAddrList, net.lookupIPDeadline publicly net: Expose net.internetAddrList, net.lookupIPDeadline publicly Jun 12, 2015

@ianlancetaylor ianlancetaylor added this to the Unplanned milestone Jun 12, 2015

@mikioh

This comment has been minimized.

Copy link
Contributor

commented Jun 26, 2017

Closing the same as #20783.

@mikioh mikioh closed this Jun 26, 2017

@golang golang locked and limited conversation to collaborators Jun 26, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.