我有一个应用程序,用Go编写,使用此功能并且无法解析DNS名称。我可以使用其他应用程序解析服务器上的DNS名称,但不能使用此功能解决基于Go的应用程序。
答案 0 :(得分:1)
如果有疑问,"使用来源,Luke"。阅读dnsclient_unix.go表明它会遍历所有已配置的服务器。
但请注意:
// If answer errored for rcodes dnsRcodeSuccess or dnsRcodeNameError,
// it means the response in msg was not useful and trying another
// server probably won't help. Return now in those cases.
// TODO: indicate this in a more obvious way, such as a field on DNSError?