Merge pull request #7 from libp2p/fix/xbuild

chore: update sockaddr to fix build
This commit is contained in:
Steven Allen
2020-03-30 17:45:39 -07:00
committed by GitHub
5 changed files with 18 additions and 18 deletions
+11
View File
@@ -0,0 +1,11 @@
version: 2.1
orbs:
ci-go: ipfs/ci-go@0.2
workflows:
version: 2
test:
jobs:
- ci-go/build
- ci-go/lint
- ci-go/test
-15
View File
@@ -1,15 +0,0 @@
language: go
go:
- 1.13.x
os:
- linux
- osx
- windows
jobs:
fast_finish: true
script:
- go test -v -race .
+2 -1
View File
@@ -4,6 +4,7 @@ go 1.13
require (
github.com/google/gopacket v1.1.17
github.com/libp2p/go-sockaddr v0.0.1 // indirect
github.com/libp2p/go-sockaddr v0.0.2
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3
golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67
)
+2 -2
View File
@@ -1,7 +1,7 @@
github.com/google/gopacket v1.1.17 h1:rMrlX2ZY2UbvT+sdz3+6J+pp2z+msCq9MxTU6ymxbBY=
github.com/google/gopacket v1.1.17/go.mod h1:UdDNZ1OO62aGYVnPhxT1U6aI7ukYtA/kB8vaU0diBUM=
github.com/libp2p/go-sockaddr v0.0.1 h1:yM3fy0n5oommws7FmCeOh+IoyEFpmlO77+2eXiaWIko=
github.com/libp2p/go-sockaddr v0.0.1/go.mod h1:EBeYKMYs5LFgoaBSN2nA2jPQVmnA4gv7WkY64CBqYqQ=
github.com/libp2p/go-sockaddr v0.0.2 h1:tCuXfpA9rq7llM/v834RKc/Xvovy/AqM9kHvTV/jY/Q=
github.com/libp2p/go-sockaddr v0.0.2/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2Le3BRLKd68k=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+3
View File
@@ -20,6 +20,9 @@ func TestRoute(t *testing.T) {
var localAddr net.IP
var hasV6 bool
addrs, err := ifs[0].Addrs()
if err != nil {
t.Fatal(err)
}
for _, addr := range addrs {
if strings.HasPrefix(addr.Network(), "ip") {
localAddr, _, _ = net.ParseCIDR(addr.String())