mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-30 01:52:26 +08:00
rename go-ipld-format package name from node to ipld
...to match the recent mass rename in #4610. License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
This commit is contained in:
@ -19,7 +19,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
cid "gx/ipfs/QmcZfnkapfECQGcLZaf9B79NRg7cRa9EnZh4LSbkCzwNvY/go-cid"
|
cid "gx/ipfs/QmcZfnkapfECQGcLZaf9B79NRg7cRa9EnZh4LSbkCzwNvY/go-cid"
|
||||||
node "gx/ipfs/Qme5bWv7wtjUNGsK2BNGVUFPKiuxWrsqrtvYwCLRw8YFES/go-ipld-format"
|
ipld "gx/ipfs/Qme5bWv7wtjUNGsK2BNGVUFPKiuxWrsqrtvYwCLRw8YFES/go-ipld-format"
|
||||||
)
|
)
|
||||||
|
|
||||||
const inputLimit = 2 << 20
|
const inputLimit = 2 << 20
|
||||||
@ -45,7 +45,7 @@ func (api *ObjectAPI) New(ctx context.Context, opts ...caopts.ObjectNewOption) (
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
var n node.Node
|
var n ipld.Node
|
||||||
switch options.Type {
|
switch options.Type {
|
||||||
case "empty":
|
case "empty":
|
||||||
n = new(dag.ProtoNode)
|
n = new(dag.ProtoNode)
|
||||||
@ -304,13 +304,13 @@ func deserializeNode(nd *Node, dataFieldEncoding string) (*dag.ProtoNode, error)
|
|||||||
return nil, fmt.Errorf("Unkown data field encoding")
|
return nil, fmt.Errorf("Unkown data field encoding")
|
||||||
}
|
}
|
||||||
|
|
||||||
dagnode.SetLinks(make([]*node.Link, len(nd.Links)))
|
dagnode.SetLinks(make([]*ipld.Link, len(nd.Links)))
|
||||||
for i, link := range nd.Links {
|
for i, link := range nd.Links {
|
||||||
c, err := cid.Decode(link.Hash)
|
c, err := cid.Decode(link.Hash)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
dagnode.Links()[i] = &node.Link{
|
dagnode.Links()[i] = &ipld.Link{
|
||||||
Name: link.Name,
|
Name: link.Name,
|
||||||
Size: link.Size,
|
Size: link.Size,
|
||||||
Cid: c,
|
Cid: c,
|
||||||
|
Reference in New Issue
Block a user