TestLookupHost expects that no duplicate addresses are returned. when cs is consulted for a name, e.g net!localhost!1, it will possibly return multiple available paths, e.g. via il and tcp. this confuses the tests.
LGTM=aram
R=jas, 0intro, aram
CC=golang-codereviews
https://golang.org/cl/
58120045
if err != nil {
return
}
+loop:
for _, line := range lines {
f := getFields(line)
if len(f) < 2 {
if ParseIP(addr) == nil {
continue
}
+ // only return unique addresses
+ for _, a := range addrs {
+ if a == addr {
+ continue loop
+ }
+ }
addrs = append(addrs, addr)
}
return