1
0
mirror of https://github.com/golang/go synced 2024-11-18 03:04:45 -07:00

vendor: update vendored lif

Updates golang_org/x/net/lif to rev a25ba90 for:
- lif: don't fail test when at least one version of INET protocols is available

Updates #19967.

Change-Id: I4b946a4c6eee7938193688ecbfc4a9d69d88c94e
Reviewed-on: https://go-review.googlesource.com/41651
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Mikio Hara 2017-04-25 18:08:59 +09:00
parent 91c9b0d568
commit 9cb004be14
2 changed files with 8 additions and 4 deletions

View File

@ -78,15 +78,17 @@ type addrPack struct {
}
func addrPacks() ([]addrPack, error) {
var lastErr error
var aps []addrPack
for _, af := range [...]int{sysAF_UNSPEC, sysAF_INET, sysAF_INET6} {
as, err := Addrs(af, "")
if err != nil {
return nil, err
lastErr = err
continue
}
aps = append(aps, addrPack{af: af, as: as})
}
return aps, nil
return aps, lastErr
}
func TestAddrs(t *testing.T) {

View File

@ -21,15 +21,17 @@ type linkPack struct {
}
func linkPacks() ([]linkPack, error) {
var lastErr error
var lps []linkPack
for _, af := range [...]int{sysAF_UNSPEC, sysAF_INET, sysAF_INET6} {
lls, err := Links(af, "")
if err != nil {
return nil, err
lastErr = err
continue
}
lps = append(lps, linkPack{af: af, lls: lls})
}
return lps, nil
return lps, lastErr
}
func TestLinks(t *testing.T) {