提交 79baf42e 作者: Hector Sanjuan

Golint: improve io.Find documentation

per @stebalien's comment

License: MIT
Signed-off-by: 's avatarHector Sanjuan <hector@protocol.ai>
上级 8bb45fda
...@@ -162,9 +162,8 @@ func (d *Directory) Links(ctx context.Context) ([]*ipld.Link, error) { ...@@ -162,9 +162,8 @@ func (d *Directory) Links(ctx context.Context) ([]*ipld.Link, error) {
return d.shard.EnumLinks(ctx) return d.shard.EnumLinks(ctx)
} }
// Find returns the ipld.Node with the given name, if it is contained in this // Find returns the root node of the file named 'name' within this directory.
// directory. Find only searches in the most inmediate links, and not // In the case of HAMT-directories, it will traverse the tree.
// recursively in the tree.
func (d *Directory) Find(ctx context.Context, name string) (ipld.Node, error) { func (d *Directory) Find(ctx context.Context, name string) (ipld.Node, error) {
if d.shard == nil { if d.shard == nil {
lnk, err := d.dirnode.GetNodeLink(name) lnk, err := d.dirnode.GetNodeLink(name)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论