Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Interestingly, but off topic, Go has its own DNS resolver that it uses when the getaddrinfo C API isn't available.


You mean the Go tools have their own resolver?

The blog at miek.nl says that Go had a DNS library written in Go in the provided samples for a while, then they removed it. It would be interesting to know why.


Go's net package has its own resolver. See http://golang.org/src/pkg/net/dnsclient.go http://golang.org/src/pkg/net/dnsclient_unix.go

But yes, it does not appear to be used anywhere now, as all of the dns lookups for each platform seem to end up at cgo calls.


Interesting to read the comments. They should just rewrite the C resolver library for UNIX. Let's face it, the Plan 9^W^WGo team would probably produce a more elegant result than what we're using now, which has had its share of bugs over the years.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: