Allow providing a custom DNS resolver
gnuletik opened this issue · comments
A new resolver is created at the start of the LookupIP
and LookupASN
functions.
Line 18 in a1960f6
Would it be possible to provide a custom resolver in the following way?
client := ipisp.NewClient(&net.Resolver{})
client.LookupIP(...)
client.LookupASN(...)
I see the value in that. We could follow suit of net/http
and have package-level methods that use a DefaultDNSClient but then give users the ability to specify their own. Unfortunately I don't have time to work on this right now but I welcome contributions.