Per il comando nslookup
, dispone di nslookup somewhere.com some.dns.server
.Perché la funzione golang Lookup *** non può fornire un parametro server?
Tuttavia, sembra che golang dnsclient solo carico config da /etc/resolv.conf
codice qui: https://golang.org/src/net/dnsclient_unix.go#L225
fa la libreria standard golang fornire qualcosa come func LookupTXT(name string, dnsServer string) (txt []string, err error)
?
requirement
: 1. Non modificare il valore predefinito /etc/resolv.conf
.
No, non è così. –
Puoi provare questa libreria invece: https://github.com/miekg/dns –
@Not_a_Golfer github.com/miekg/dns è troppo pesante per me. – holys