Merge pull request #40 from multiformats/fix/multiformats-org

Update multiformats imports & go-multihash dep
This commit is contained in:
Lars Gierth 2016-09-29 15:30:47 +02:00 committed by GitHub
commit 407d06bbd6
7 changed files with 17 additions and 9 deletions

View File

@ -1 +1 @@
1.1.0: QmRWzPoJjoEfhbNNiADWGL4WrTe7vF1ob2fYDcvNgeWuVM
1.1.1: QmTKShqzu4Sr5trPY8KN7DihwFMaPMX78RZbrSZ8M3rSf9

View File

@ -2,7 +2,7 @@ language: go
go:
- tip
- 1.6.1
- 1.7
script:
- go test -race -cpu=5 -v ./...

View File

@ -34,7 +34,7 @@ go get multiformats/multiaddr
#### Simple
```go
import ma "github.com/jbenet/go-multiaddr"
import ma "github.com/multiformats/go-multiaddr"
// construct from a string (err signals parse failure)
m1, err := ma.NewMultiaddr("/ip4/127.0.0.1/udp/1234")

View File

@ -4,13 +4,13 @@ import (
"bytes"
"encoding/base32"
"encoding/binary"
"errors"
"fmt"
"net"
"strconv"
"strings"
"errors"
mh "github.com/jbenet/go-multihash"
mh "github.com/multiformats/go-multihash"
)
func stringToBytes(s string) ([]byte, error) {
@ -298,7 +298,7 @@ func addressBytesToString(p Protocol, b []byte) (string, error) {
case P_ONION:
addr := strings.ToLower(base32.StdEncoding.EncodeToString(b[0:10]))
port := binary.BigEndian.Uint16(b[10:12])
return addr + ":"+ strconv.Itoa(int(port)), nil
return addr + ":" + strconv.Itoa(int(port)), nil
case P_UNIX:
// the address is a varint len prefixed string

2
doc.go
View File

@ -10,7 +10,7 @@ Basic Use:
import (
"bytes"
"strings"
ma "github.com/jbenet/go-multiaddr"
ma "github.com/multiformats/go-multiaddr"
)
// construct from a string (err signals parse failure)

View File

@ -7,7 +7,7 @@ Learn more here: https://github.com/jbenet/multiaddr
Multiaddrs have both a binary and string representation.
import ma "github.com/jbenet/go-multiaddr"
import ma "github.com/multiformats/go-multiaddr"
addr, err := ma.NewMultiaddr("/ip4/1.2.3.4/tcp/80")
// err non-nil when parsing failed.

View File

@ -6,9 +6,17 @@
"gx": {
"dvcsimport": "github.com/multiformats/go-multiaddr"
},
"gxDependencies": [
{
"hash": "QmTvWHtHQhkRD33UNzP3NKsUxX2k2oonrgHXYis7wdhCbA",
"name": "go-multihash",
"version": "0.1.0"
}
],
"gxVersion": "0.9.0",
"language": "go",
"license": "MIT",
"name": "go-multiaddr",
"version": "1.1.0"
"releaseCmd": "git commit -a -m 'gx publish $VERSION'",
"version": "1.1.1"
}