Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c7d9e3de2 | ||
|
|
e5a96152bd | ||
|
|
0f69fedd3a | ||
|
|
595cace68a |
@@ -1 +1 @@
|
||||
0.3.0: QmfAjb1QYA9SS9TLVJBRZXEVriGaGrRZ3vJSajhLa52aYg
|
||||
0.5.2: QmakyCk6Vnn16WEKjbkxieZmM2YLTzkFWizbmGowoYPjro
|
||||
|
||||
16
cid.go
16
cid.go
@@ -5,17 +5,17 @@ import (
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
|
||||
mh "github.com/jbenet/go-multihash"
|
||||
mbase "github.com/multiformats/go-multibase"
|
||||
mh "github.com/multiformats/go-multihash"
|
||||
)
|
||||
|
||||
const UnsupportedVersionString = "<unsupported cid version>"
|
||||
|
||||
const (
|
||||
Protobuf = iota
|
||||
Raw
|
||||
JSON
|
||||
CBOR
|
||||
Protobuf = 0x70
|
||||
CBOR = 0x71
|
||||
Raw = 0x72
|
||||
JSON = 0x73
|
||||
)
|
||||
|
||||
func NewCidV0(h mh.Multihash) *Cid {
|
||||
@@ -168,3 +168,9 @@ func (c *Cid) MarshalJSON() ([]byte, error) {
|
||||
func (c *Cid) KeyString() string {
|
||||
return string(c.Bytes())
|
||||
}
|
||||
|
||||
func (c *Cid) Loggable() map[string]interface{} {
|
||||
return map[string]interface{}{
|
||||
"cid": c,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"bytes"
|
||||
"testing"
|
||||
|
||||
mh "github.com/jbenet/go-multihash"
|
||||
mh "github.com/multiformats/go-multihash"
|
||||
)
|
||||
|
||||
func assertEqual(t *testing.T, a, b *Cid) {
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
"gxDependencies": [
|
||||
{
|
||||
"author": "whyrusleeping",
|
||||
"hash": "QmYf7ng2hG5XBtJA3tN34DQ2GUN5HNksEw1rLDkmr6vGku",
|
||||
"hash": "QmYDds3421prZgqKbLpEK7T9Aa2eVdQ7o3YarX1LVLdP2J",
|
||||
"name": "go-multihash",
|
||||
"version": "0.0.0"
|
||||
"version": "1.0.0"
|
||||
},
|
||||
{
|
||||
"author": "whyrusleeping",
|
||||
@@ -25,6 +25,6 @@
|
||||
"license": "",
|
||||
"name": "go-cid",
|
||||
"releaseCmd": "git commit -a -m \"gx publish $VERSION\"",
|
||||
"version": "0.3.0"
|
||||
"version": "0.5.2"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user