|
10 | 10 | //
|
11 | 11 | // A CIDv1 has four parts:
|
12 | 12 | //
|
13 |
| -// <cidv1> ::= <multibase-prefix><cid-version><multicodec-packed-content-type><multihash-content-address> |
| 13 | +// <cidv1> ::= <multibase-prefix><cid-version><multicodec-packed-content-type><multihash-content-address> |
14 | 14 | //
|
15 | 15 | // As shown above, the CID implementation relies heavily on Multiformats,
|
16 | 16 | // particularly Multibase
|
@@ -193,7 +193,7 @@ func MustParse(v interface{}) Cid {
|
193 | 193 | // Decode parses a Cid-encoded string and returns a Cid object.
|
194 | 194 | // For CidV1, a Cid-encoded string is primarily a multibase string:
|
195 | 195 | //
|
196 |
| -// <multibase-type-code><base-encoded-string> |
| 196 | +// <multibase-type-code><base-encoded-string> |
197 | 197 | //
|
198 | 198 | // The base-encoded string represents a:
|
199 | 199 | //
|
@@ -249,7 +249,7 @@ func ExtractEncoding(v string) (mbase.Encoding, error) {
|
249 | 249 | // Cast takes a Cid data slice, parses it and returns a Cid.
|
250 | 250 | // For CidV1, the data buffer is in the form:
|
251 | 251 | //
|
252 |
| -// <version><codec-type><multihash> |
| 252 | +// <version><codec-type><multihash> |
253 | 253 | //
|
254 | 254 | // CidV0 are also supported. In particular, data buffers starting
|
255 | 255 | // with length 34 bytes, which starts with bytes [18,32...] are considered
|
@@ -465,7 +465,7 @@ func (c *Cid) UnmarshalJSON(b []byte) error {
|
465 | 465 |
|
466 | 466 | // MarshalJSON procudes a JSON representation of a Cid, which looks as follows:
|
467 | 467 | //
|
468 |
| -// { "/": "<cid-string>" } |
| 468 | +// { "/": "<cid-string>" } |
469 | 469 | //
|
470 | 470 | // Note that this formatting comes from the IPLD specification
|
471 | 471 | // (https://github.com/ipld/specs/tree/master/ipld)
|
@@ -522,7 +522,8 @@ func (c Cid) Prefix() Prefix {
|
522 | 522 | // and the Multihash length. It does not contains
|
523 | 523 | // any actual content information.
|
524 | 524 | // NOTE: The use -1 in MhLength to mean default length is deprecated,
|
525 |
| -// use the V0Builder or V1Builder structures instead |
| 525 | +// |
| 526 | +// use the V0Builder or V1Builder structures instead |
526 | 527 | type Prefix struct {
|
527 | 528 | Version uint64
|
528 | 529 | Codec uint64
|
@@ -561,7 +562,7 @@ func (p Prefix) Sum(data []byte) (Cid, error) {
|
561 | 562 |
|
562 | 563 | // Bytes returns a byte representation of a Prefix. It looks like:
|
563 | 564 | //
|
564 |
| -// <version><codec><mh-type><mh-length> |
| 565 | +// <version><codec><mh-type><mh-length> |
565 | 566 | func (p Prefix) Bytes() []byte {
|
566 | 567 | size := varint.UvarintSize(p.Version)
|
567 | 568 | size += varint.UvarintSize(p.Codec)
|
|
0 commit comments