Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e5a96152bd | ||
|
|
0f69fedd3a | ||
|
|
595cace68a |
@@ -1 +1 @@
|
|||||||
0.3.0: QmfAjb1QYA9SS9TLVJBRZXEVriGaGrRZ3vJSajhLa52aYg
|
0.5.1: QmUrECr5NauzkUaofvUnCFGjZ4Wevt76n79uv6BhEkuyn3
|
||||||
|
|||||||
14
cid.go
14
cid.go
@@ -12,10 +12,10 @@ import (
|
|||||||
const UnsupportedVersionString = "<unsupported cid version>"
|
const UnsupportedVersionString = "<unsupported cid version>"
|
||||||
|
|
||||||
const (
|
const (
|
||||||
Protobuf = iota
|
Protobuf = 0x70
|
||||||
Raw
|
CBOR = 0x71
|
||||||
JSON
|
Raw = 0x72
|
||||||
CBOR
|
JSON = 0x73
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewCidV0(h mh.Multihash) *Cid {
|
func NewCidV0(h mh.Multihash) *Cid {
|
||||||
@@ -168,3 +168,9 @@ func (c *Cid) MarshalJSON() ([]byte, error) {
|
|||||||
func (c *Cid) KeyString() string {
|
func (c *Cid) KeyString() string {
|
||||||
return string(c.Bytes())
|
return string(c.Bytes())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *Cid) Loggable() map[string]interface{} {
|
||||||
|
return map[string]interface{}{
|
||||||
|
"cid": c,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -9,9 +9,9 @@
|
|||||||
"gxDependencies": [
|
"gxDependencies": [
|
||||||
{
|
{
|
||||||
"author": "whyrusleeping",
|
"author": "whyrusleeping",
|
||||||
"hash": "QmYf7ng2hG5XBtJA3tN34DQ2GUN5HNksEw1rLDkmr6vGku",
|
"hash": "QmYDds3421prZgqKbLpEK7T9Aa2eVdQ7o3YarX1LVLdP2J",
|
||||||
"name": "go-multihash",
|
"name": "go-multihash",
|
||||||
"version": "0.0.0"
|
"version": "1.0.0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"author": "whyrusleeping",
|
"author": "whyrusleeping",
|
||||||
@@ -25,6 +25,6 @@
|
|||||||
"license": "",
|
"license": "",
|
||||||
"name": "go-cid",
|
"name": "go-cid",
|
||||||
"releaseCmd": "git commit -a -m \"gx publish $VERSION\"",
|
"releaseCmd": "git commit -a -m \"gx publish $VERSION\"",
|
||||||
"version": "0.3.0"
|
"version": "0.5.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user