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: provide mechanism to force DNS via cgo #11450
We should probably provide a mechanism in Go 1.5 to let users force the use of cgo/libc for DNS resolution. I'm afraid the pure Go solution will have problems for some users, and saying "modifying your nsswitch.conf or resolv.conf to be 'complicated enough'" isn't a great answer.
So, two questions:
If we're talking about #10552, then I think an environment variable would be more useful than a compile-time option, because often the people affected will not be the application developers.
That said, it's better to ship a correct algorithm, than an incorrect one with an easy workaround.