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: