Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
net: DNS lookups do not include host name suffix as a search domain #14897
src/net/dnsconfig_unix.go has this comment:
// See resolv.conf(5) on a Linux machine.
...which succinctly describes the issue.
Here's an example: Given a server with uname -n "foo.x.y.z" where /etc/resolv.conf only has nameserver lines, and with another server with hostname "bar.x.y.z", net.LookupHost("bar") results in "no such host" when using the built-in DNS resolver, but succeeds when running with "GODEBUG=netdns=cgo".
go version: go version go1.6 linux/amd64