I tried to resolve hostname that contains special symbols, e.g. '/', '='. But I got error 'no such host'. Utilities host, dig and nslookup provides this opportunity. Also they allow to resolve hostnames with length is more then 255 symbols unlike net.LookupHost.
_, err := net.LookupHost("/.yandex.ru")
fmt.Println(err) // lookup /.yandex.ru: no such host
What did you expect to see?
For example, host:
$ host /.yandex.ru
/.yandex.ru has address 184.108.40.206
/.yandex.ru mail is handled by 10 not-for-mail.yandex.net.
The text was updated successfully, but these errors were encountered:
I feel like it's not a good idea to make the existing lookup API more generic name resolution stuff because it's still hard to implement correct and safe resolution under any environments. Instead, probably it'd be better for user applications to take the responsibility for selecting label encodings and recursive servers. The net package may help such applications under heterogeneous environments by providing improved type Resolver struct and upcoming DNS signaling/messaging/transportation stuff.