net.LookupHost changes post ~1.42

I’ve been using the net.LookupHost(hostname_goes_here) function from the net package and found that at some version after 1.4.2 it stops using all the DNS servers listed /etc/resolv.conf and only uses the first one, if that fails it stops and returns error. Is that intentional or a bug?

It should still be iterating over all servers. However, note the comment starting on line 194. Is that the error you’re getting?

I opened a ticket on github and they linked me to another. The issue has been “resolved” in 1.7.2 (beta).

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.