1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-29 01:12:24 +08:00

Golint: improve io.Find documentation

per @stebalien's comment

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
This commit is contained in:
Hector Sanjuan
2018-02-06 19:17:59 +01:00
parent 8bb45fda8e
commit 79baf42e1e

View File

@ -162,9 +162,8 @@ func (d *Directory) Links(ctx context.Context) ([]*ipld.Link, error) {
return d.shard.EnumLinks(ctx)
}
// Find returns the ipld.Node with the given name, if it is contained in this
// directory. Find only searches in the most inmediate links, and not
// recursively in the tree.
// Find returns the root node of the file named 'name' within this directory.
// In the case of HAMT-directories, it will traverse the tree.
func (d *Directory) Find(ctx context.Context, name string) (ipld.Node, error) {
if d.shard == nil {
lnk, err := d.dirnode.GetNodeLink(name)