Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
net: rename Resolver.Dial to Resolver.DialContext before Go1.9rc1? #19910
CL 37260 proposes add a new field to net.Resolver:
Elevating that CL to a proposal, hopefully a quick one.
This would allow control over the source address for DNS lookups in multi-homed systems (#17404).
Discussion on #19268 suggests that the new Dial field would be an acceptable solution for "do DNS lookups using a custom server", by installing a Dial func that lies about what server it has connected to. Of course that only works if /etc/resolv.conf lists some name server. If there are no resolvers then Dial will never be called. This particular use seems a bit kludgy, but fine if it resolves that need.
referenced this issue
Apr 10, 2017
@bradfitz and @rsc, @benburkert raises a great point that it seems like @nerdatmath's CL https://go-review.googlesource.com/c/37260/8/src/net/lookup.go#106 already added the proposed field and perhaps we just need to rename it to DialContext?
Also by superficially skimming through the issue, I think after that rename, we'd have addressed @bradfitz's request in #19910 (comment) and then the issue can be marked as resolved. What do y'all think?