-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: go cannot resolve localhost on darwin when net.DefaultResolver.PreferGo = true #24393
Comments
With resolvers in This appears to be specific to an interaction with the two Google Public DNS IPs. |
Oh of course: most recursors implement local data for If something more unique is put into |
With Thus
is incorrect. |
@philpennock is right—the documentation stating When the example program is called with |
I can reproduce on a Mac, adding
With my just-sent https://golang.org/cl/100875, it now works as expected:
vs
|
Change https://golang.org/cl/100875 mentions this issue: |
What did you do?
# main.go
What did you expect to see?
Go is able to resolve
localhost
whennet.DefaultResolver.PreferGo = true
.What did you see instead?
Go is unable to resolve
localhost
. In the debug outputgo package net: hostLookupOrder(localhost) = cgo
shows that it is not looking at/etc/hosts
.System details
The text was updated successfully, but these errors were encountered: