/ go Public
net: different lists of addresses are returned depending on order of multiple aliases in /etc/hosts on Mac OS with CGO #24514
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
net.LookupIPmay return a different list of addresses depending on the order of multiple names in an
127.0.0.1 my.local localhost). I don't know if this should be surprising or not; however, I did have a NATS client as well as an official NATS sample client malfunction on me, and I wondered what the problem might be.
What version of Go are you using (
go version go1.10 darwin/amd64
Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
What did you do?
/etc/hosts. (After changing
sudo killall -HUP mDNSResponder).
What did you expect to see?
I expected the returned set of IPs to be the same in all four tests.
What did you see instead?
The combination of
cgocaused a different set of addresses to be resolved.
The text was updated successfully, but these errors were encountered: