ipfs / go-cid

Content ID v1 implemented in go
MIT License
157 stars 47 forks source link

Serializable Cid type - Exporting .Version .Codec .Hash #14

Closed hsanjuan closed 7 years ago

hsanjuan commented 7 years ago

The Cid-Type fields are unexported:

https://github.com/ipfs/go-cid/blob/master/cid.go#L46

This means that Cids need to be stringified/jsonified etc. when serialized (encoded/decoded) and re-decoded when deserialized.

What do people think of exporting those fields?

hsanjuan commented 7 years ago

See #16