No, the only exposed API is Dial. - sean
On Thu, Jun 19, 2025, 18:45 Denton Gentry <denton.gen...@gmail.com> wrote: > One can supply a net.Resolver with a Dial function to connect to whatever > DNS server one wishes. > > I have a system where an alternate set of DNS servers is written to > /usr/local/etc/resolv.conf. I don't see a straightforward way to supply my > own dnsConfig which reads in this alternate resolv.conf to replace the > configuration read from /etc/resolv.conf. > > If there were a way to do this I could leave the regular Dial > implementation and other functionality in place, could let it choose > amongst the set of available DNS servers, etc. > > Searching github hasn't turned up examples of implementing reading in an > alternate dnsConfig, is there nonetheless a way to do so? > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion visit > https://groups.google.com/d/msgid/golang-nuts/37516741-6a10-432c-8ccf-046f7760b73fn%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nuts/37516741-6a10-432c-8ccf-046f7760b73fn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/CAGabyPqLz9dZLTvgNZJkgQJxxNSaBrudmbO4nAf9jARbfmbcgA%40mail.gmail.com.