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: misleading lookup error message #6324
If you look up a not fully qualified name via net.Lookup* functions and the name can't be resolved, it will print the name as it was a fully qualified name. Given you have the search path "example.com" and try to resolve "foo": If "foo.example.com" can't be resolved, net prints: lookup foo.: no such host Which is misleading because you expect it tried to resolve "foo." where it in fact (as designed) tried to resolve "foo.example.com" as well. Reason for this: https://code.google.com/p/go/source/browse/src/pkg/net/dnsclient_unix.go#208 makes the name fully qualified and the error will be returned right away. IMO it should use the originally provided name for the error.
This issue was closed.