Hacker News new | ask | show | jobs
Go read /etc/hosts with net.lookupStaticHost() (github.com)
3 points by michalmatczuk 852 days ago
1 comments

We need to check if given domain name points to localhost.

Previously we used resolver with custom dialer that never dials connection but this resulted in unexpected allocations :/

This patch links net.lookupStaticHost(), clean and simple.