提交 fbf8f5dd 作者: Steven Allen

rename go-ipld-format package name from node to ipld

...to match the recent mass rename in #4610.

License: MIT
Signed-off-by: 's avatarSteven Allen <steven@stebalien.com>
上级 b1dbc1c4
...@@ -19,7 +19,7 @@ import ( ...@@ -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) ( ...@@ -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) ...@@ -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,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论