Why is this specific to Resolver.LookupIP? Seems like exactly the same issue arises for LookupHost, Resolver.LookupHost, LookupIP, Resolver.LookupIPAddr, LookupSRV, Resolver.LookupSRV, LookupMX, Resolver.LookupMX, LookupNS, Resolver.LookupNS, LookupTXT, Resolver.LookupTXT, LookupAddr, Resolver.LookupAddr, and possibly others.
The current document on
net.Resolver.LookupIPwas not clear on the return values (i.e. what to expect when
Looking into the source code,
internetAddrListhere, and the comment for
internetAddrListhere does state the slice would contain at least one IP when err is nil.
We should duplicate the comment of
The text was updated successfully, but these errors were encountered: