Go's Pure-Go DNS Resolver and the Hosts File Fast Path
The net package picks a lookup order from nsswitch.conf, checks /etc/hosts with a five-second cache, then queries the pure-Go DNS client, which reads resolv.conf, walks the search …
The net package picks a lookup order from nsswitch.conf, checks /etc/hosts with a five-second cache, then queries the pure-Go DNS client, which reads resolv.conf, walks the search …