Golint: improve io.Find documentation
per @stebalien's comment License: MIT Signed-off-by: Hector Sanjuan <hector@protocol.ai>
Hector Sanjuan committed
Feb 6, 2018 at 19:17 UTC
79baf42e1e315b3ca064cda6991fa99ac24986e1
1 file changed
+2
-3
unixfs/io/dirbuilder.go
+2
-3
@@ -162,9 +162,8 @@ func (d *Directory) Links(ctx context.Context) ([]*ipld.Link, error) {
162
return d.shard.EnumLinks(ctx)
163
}
164
165
-// Find returns the ipld.Node with the given name, if it is contained in this
166
-// directory. Find only searches in the most inmediate links, and not
167
-// recursively in the tree.
165
+// Find returns the root node of the file named 'name' within this directory.
166
+// In the case of HAMT-directories, it will traverse the tree.
167
func (d *Directory) Find(ctx context.Context, name string) (ipld.Node, error) {
168
if d.shard == nil {
169
lnk, err := d.dirnode.GetNodeLink(name)