mirror of
https://github.com/waku-org/go-multiaddr.git
synced 2025-02-23 11:38:20 +00:00
Merge pull request #61 from multiformats/fix/global-multiaddr-registry
fix: use global multiaddr definitions
This commit is contained in:
commit
a5c136c974
@ -4,7 +4,7 @@ os:
|
|||||||
language: go
|
language: go
|
||||||
|
|
||||||
go:
|
go:
|
||||||
- 1.11.x
|
- 1.12.x
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
|
18
README.md
18
README.md
@ -1,6 +1,6 @@
|
|||||||
# go-multiaddr-net
|
# go-multiaddr-net
|
||||||
|
|
||||||
[](http://ipn.io)
|
[](https://protocol.ai)
|
||||||
[](https://github.com/multiformats/multiformats)
|
[](https://github.com/multiformats/multiformats)
|
||||||
[](https://webchat.freenode.net/?channels=%23ipfs)
|
[](https://webchat.freenode.net/?channels=%23ipfs)
|
||||||
[](https://github.com/RichardLitt/standard-readme)
|
[](https://github.com/RichardLitt/standard-readme)
|
||||||
@ -35,21 +35,7 @@ Note that `go-multiaddr-net` is packaged with Gx, so it is recommended to use Gx
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
This module is packaged with [Gx](https://github.com/whyrusleeping/gx). In order to use it in your own project do:
|
See the docs:
|
||||||
|
|
||||||
```sh
|
|
||||||
go get -u github.com/whyrusleeping/gx
|
|
||||||
go get -u github.com/whyrusleeping/gx-go
|
|
||||||
cd <your-project-repository>
|
|
||||||
gx init
|
|
||||||
gx import github.com/multiformats/go-multiaddr-net
|
|
||||||
gx install --global
|
|
||||||
gx-go --rewrite
|
|
||||||
```
|
|
||||||
|
|
||||||
Please check [Gx](https://github.com/whyrusleeping/gx) and [Gx-go](https://github.com/whyrusleeping/gx-go) documentation for more information.
|
|
||||||
|
|
||||||
For further usage, see the docs:
|
|
||||||
|
|
||||||
- `multiaddr/net`: https://godoc.org/github.com/multiformats/go-multiaddr-net
|
- `multiaddr/net`: https://godoc.org/github.com/multiformats/go-multiaddr-net
|
||||||
- `multiaddr`: https://godoc.org/github.com/multiformats/go-multiaddr
|
- `multiaddr`: https://godoc.org/github.com/multiformats/go-multiaddr
|
||||||
|
@ -6,7 +6,6 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
ma "github.com/multiformats/go-multiaddr"
|
ma "github.com/multiformats/go-multiaddr"
|
||||||
madns "github.com/multiformats/go-multiaddr-dns"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var errIncorrectNetAddr = fmt.Errorf("incorrect network addr conversion")
|
var errIncorrectNetAddr = fmt.Errorf("incorrect network addr conversion")
|
||||||
@ -131,12 +130,12 @@ func DialArgs(m ma.Multiaddr) (string, string, error) {
|
|||||||
network = "ip4"
|
network = "ip4"
|
||||||
ip = c.Value()
|
ip = c.Value()
|
||||||
return true
|
return true
|
||||||
case madns.Dns4Protocol.Code:
|
case ma.P_DNS4:
|
||||||
network = "ip4"
|
network = "ip4"
|
||||||
hostname = true
|
hostname = true
|
||||||
ip = c.Value()
|
ip = c.Value()
|
||||||
return true
|
return true
|
||||||
case madns.Dns6Protocol.Code:
|
case ma.P_DNS6:
|
||||||
network = "ip6"
|
network = "ip6"
|
||||||
hostname = true
|
hostname = true
|
||||||
ip = c.Value()
|
ip = c.Value()
|
||||||
|
7
go.mod
7
go.mod
@ -1,6 +1,5 @@
|
|||||||
module github.com/multiformats/go-multiaddr-net
|
module github.com/multiformats/go-multiaddr-net
|
||||||
|
|
||||||
require (
|
require github.com/multiformats/go-multiaddr v0.1.0
|
||||||
github.com/multiformats/go-multiaddr v0.0.1
|
|
||||||
github.com/multiformats/go-multiaddr-dns v0.0.1
|
go 1.12
|
||||||
)
|
|
||||||
|
6
go.sum
6
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/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 h1:Y51FGVJ91WBqCEabAi5OPUz38eAx8DakuAm5svLcsfQ=
|
||||||
github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8=
|
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.1.0 h1:fkISCUNDb3xIpCcI6BGlPsQE+ywcxzimOsUnHWnrE74=
|
||||||
github.com/multiformats/go-multiaddr v0.0.1/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44=
|
github.com/multiformats/go-multiaddr v0.1.0/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-multihash v0.0.1 h1:HHwN1K12I+XllBCrqKnhX949Orn4oawPkegHMu2vDqQ=
|
github.com/multiformats/go-multihash v0.0.1 h1:HHwN1K12I+XllBCrqKnhX949Orn4oawPkegHMu2vDqQ=
|
||||||
github.com/multiformats/go-multihash v0.0.1/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKTwfvkofsjW2Qa1ct4U=
|
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=
|
golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67 h1:ng3VDlRp5/DHpSWl02R4rM9I+8M2rhmsuLwAMmkLQWE=
|
||||||
|
Loading…
x
Reference in New Issue
Block a user