Hi I have been looking for a way to get
ttl numbers for dns
TXT entries. As it seems the
golang standard library doesn’t support
ttl for entries I have been looking into miekg/dns. It works well, but for it to work out-of-the-box I need to get the systems dns servers. Since the system settings are per network interface I was assuming
net.Interfaces() to have a
Interface.DNS property or have a
net.DNSServers() function available.
Do you know a different library that could help with this?
Do you think this should be a golang standard library issue?
Do you think it should be a feature of the golang std lib to support TTL’s for dns entries?
Should this be a feature of third party libraries like
Note: From using it in Node.js it seems it should be possible to implement it in a cross-plattform manner. Possibly because Node is using c-ares in the background?
$ node -p "(new dns.Resolver).getServers()"