Releases: ipfs/go-cid
Releases · ipfs/go-cid
v0.4.1
What's Changed
- CidFromReader should not wrap valid EOF return. by @gammazero in #151
Full Changelog: v0.4.0...v0.4.1
v0.4.0
What's Changed
- edit README.md example error by @susarlanikhilesh in #146
- sync: update CI config files by @web3-bot in #147
- build(deps): bump golang.org/x/sys from 0.0.0-20210309074719-68d13333faf2 to 0.1.0 by @dependabot in #148
- build(deps): bump golang.org/x/crypto from 0.0.0-20210506145944-38f3c27a63bf to 0.1.0 by @dependabot in #149
- feat: wrap parsing errors into ErrInvalidCid by @hacdias in #150
New Contributors
- @susarlanikhilesh made their first contribution in #146
- @dependabot made their first contribution in #148
Full Changelog: v0.3.2...v0.4.0
v0.3.2
v0.3.1
v0.3.0
v0.2.0
What's Changed
- avoid double alloc in NewCidV1 by @mvdan in #132
- benchmark existing ways to check for
IDENTITY
CIDs by @masih in #135 - fix: remove invalid multicodec2string mappings by @lidel in #137
- sync: update CI config files by @web3-bot in #131, #136, #138
BREAKING CHANGE
Converting code to string and vice versa will no longer be done with go-cid (#137), go-multicodec should be used instead.
NOTE: old mapping was invalid, and switching to go-multicodec will change the meaning of code 0x70
and 0x71
and strings cbor
and protobuf
:
protobuf
string now correctly points at code0x50
(was0x70
, which isdag-pb
)0x70
code is mapped todag-pb
(wasprotobuf
before)
cbor
string now correctly points at code0x51
(was0x71
, which isdag-cbor
)0x71
code is now mapped todag-cbor
(wascbor
before)
Refactor guide
Old way (go-cid < 0.2.0)
cid "github.com/ipfs/go-cid"
// string → code
code := cid.Codecs["libp2p-key"]
// code → string
string := cid.CodecToStr[code]
New way (with go-multicodec)
mc "github.com/multiformats/go-multicodec"
// string → code
var mc.Code code
code.Set("libp2p-key")
// code → string
code.String()
New Contributors
Full Changelog: v0.1.0...v0.2.0
Release v0.1.0
- Updates multihash to the new registry system.
- Adds CidFromReader to read a stream of CIDs from a reader.