From 6f951560f534e88d28de8c5e8ced17dfc44db549 Mon Sep 17 00:00:00 2001 From: Kevin Atkinson Date: Thu, 28 Jun 2018 23:08:17 -0400 Subject: [PATCH] Update deprecated note to reflect code review. --- cid.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cid.go b/cid.go index 7461836..6a1f36e 100644 --- a/cid.go +++ b/cid.go @@ -444,6 +444,8 @@ func (c *Cid) Prefix() Prefix { // that is, the Version, the Codec, the Multihash type // and the Multihash length. It does not contains // any actual content information. +// NOTE: The use -1 in MhLength to mean default length is deprecated, +// use the PrefixV0 or PrefixV1 structures instead type Prefix struct { Version uint64 Codec uint64 @@ -453,7 +455,6 @@ type Prefix struct { // Sum uses the information in a prefix to perform a multihash.Sum() // and return a newly constructed Cid with the resulting multihash. -// DEPRECATED: Use PrefixToFormat(p).Sum(data) func (p Prefix) Sum(data []byte) (*Cid, error) { hash, err := mh.Sum(data, p.MhType, p.MhLength) if err != nil {