-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/net/dns: add LookupCNAME #29039
Comments
This may be more appropriate for golang.org/x/net/dns, or similar, rather than the standard library. |
@therealjoesmith how do you feel about @ianlancetaylor’s suggestion to have this in /x/net/dns? |
I don't have any convincing argument either way. I appreciate the standard library is already complicated as it is. I'll leave it to more informed contributors to make that decision. |
Is there any reason that the new functionality could not go in x/net/dns? |
If you want detailed DNS information, the right thing to do is to use a DNS-specific package. The routines in package net are for getting basic stuff done, not advanced queries. It's probably fine to add to x/net/dns but that doesn't need to be a proposal. /cc @miekg |
Some more DNS goodies for you @iangudger, if interested. |
To clarify, the proposal that was accepted was adding LookupCNAME to x/net/dns? In order to do that, we are going to need a DNS client there. |
Implemented. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What did you do?
https://play.golang.org/p/HTHVSd81SPJ
What did you expect to see?
I wanted to see the chain of CNAME records for www.microsoft.com.
What did you see instead?
Go returns only the last record. That's correct (it is the canonical name after all), but there are situations where it's interesting to probe the chain. On the command line, try:
I'd like functions that return a []string of the intermediaries instead of just the final CNAME.
The text was updated successfully, but these errors were encountered: