You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
changed the title
Expose net.internetAddrList, net.lookupIPDeadline publicly
net: Expose net.internetAddrList, net.lookupIPDeadline publicly
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.The text was updated successfully, but these errors were encountered: