diff --git a/convert.go b/convert.go index 061f1c4..b1e5446 100644 --- a/convert.go +++ b/convert.go @@ -6,7 +6,6 @@ import ( "path/filepath" ma "github.com/multiformats/go-multiaddr" - madns "github.com/multiformats/go-multiaddr-dns" ) var errIncorrectNetAddr = fmt.Errorf("incorrect network addr conversion") @@ -131,12 +130,12 @@ func DialArgs(m ma.Multiaddr) (string, string, error) { network = "ip4" ip = c.Value() return true - case madns.Dns4Protocol.Code: + case ma.P_DNS4: network = "ip4" hostname = true ip = c.Value() return true - case madns.Dns6Protocol.Code: + case ma.P_DNS6: network = "ip6" hostname = true ip = c.Value() diff --git a/go.mod b/go.mod index 57c2827..bb2ec44 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,5 @@ module github.com/multiformats/go-multiaddr-net -require ( - github.com/multiformats/go-multiaddr v0.0.1 - github.com/multiformats/go-multiaddr-dns v0.0.1 -) +require github.com/multiformats/go-multiaddr v0.1.0 + +go 1.12 diff --git a/go.sum b/go.sum index fc801ca..87f7a09 100644 --- a/go.sum +++ b/go.sum @@ -8,10 +8,8 @@ github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16 h1:5W7KhL8HVF3XC github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= github.com/mr-tron/base58 v1.1.0 h1:Y51FGVJ91WBqCEabAi5OPUz38eAx8DakuAm5svLcsfQ= github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= -github.com/multiformats/go-multiaddr v0.0.1 h1:/QUV3VBMDI6pi6xfiw7lr6xhDWWvQKn9udPn68kLSdY= -github.com/multiformats/go-multiaddr v0.0.1/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= -github.com/multiformats/go-multiaddr-dns v0.0.1 h1:jQt9c6tDSdQLIlBo4tXYx7QUHCPjxsB1zXcag/2S7zc= -github.com/multiformats/go-multiaddr-dns v0.0.1/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= +github.com/multiformats/go-multiaddr v0.1.0 h1:fkISCUNDb3xIpCcI6BGlPsQE+ywcxzimOsUnHWnrE74= +github.com/multiformats/go-multiaddr v0.1.0/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= github.com/multiformats/go-multihash v0.0.1 h1:HHwN1K12I+XllBCrqKnhX949Orn4oawPkegHMu2vDqQ= github.com/multiformats/go-multihash v0.0.1/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKTwfvkofsjW2Qa1ct4U= golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67 h1:ng3VDlRp5/DHpSWl02R4rM9I+8M2rhmsuLwAMmkLQWE=