Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net: prefer /etc/hosts over DNS when no /etc/nsswitch.conf is present
Do not mimic glibc behavior if /etc/nsswitch.conf is missing. This will will likely be missing on musl libc systems and glibc systems will likely always have it, resulting in localhost lookup being done over DNS rather than from /etc/hosts. Do what makes most sense rather than making any assumption about the libc. Fixes golang#35305