Closed chadell closed 6 years ago
Lookup support IPv4 and IPv6 resolution: https://golang.org/src/net/lookup.go?s=5208:5248#L157
Regarding the static access to the first element of the array addrs[0]
. If the resolution has worked well it will be always a first entry. Another way, it could be a random selection in addrs[], but I don't see too much value...
@dcaba have a look at my two comments ;)
See my commits, as it addresses some of my comments (remember to pull them in your local git repo!). Then only variable naming matters should require a look...