From a1d05669bb7a84dd7d21846216994581cbebb204 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Tue, 7 Mar 2023 23:09:13 +1100 Subject: [PATCH] chore!: make PBLinkItr private - not intended for public use --- iter/iter.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/iter/iter.go b/iter/iter.go index fb5a66f..3be099d 100644 --- a/iter/iter.go +++ b/iter/iter.go @@ -5,22 +5,22 @@ import ( "github.com/ipld/go-ipld-prime" ) -// PBLinkItr behaves like an list of links iterator, even thought the HAMT behavior is more complicated -type PBLinkItr interface { +// pbLinkItr behaves like an list of links iterator, even thought the HAMT behavior is more complicated +type pbLinkItr interface { Next() (int64, dagpb.PBLink, error) Done() bool } type TransformNameFunc func(dagpb.String) dagpb.String -func NewUnixFSDirMapIterator(itr PBLinkItr, transformName TransformNameFunc) ipld.MapIterator { +func NewUnixFSDirMapIterator(itr pbLinkItr, transformName TransformNameFunc) ipld.MapIterator { return &UnixFSDir__MapItr{itr, transformName} } // UnixFSDir__MapItr throught the links as if they were a map // Note: for now it does return links with no name, where the key is just String("") type UnixFSDir__MapItr struct { - _substrate PBLinkItr + _substrate pbLinkItr transformName TransformNameFunc } @@ -53,11 +53,11 @@ func (itr *UnixFSDir__MapItr) Done() bool { } type UnixFSDir__Itr struct { - _substrate PBLinkItr + _substrate pbLinkItr transformName TransformNameFunc } -func NewUnixFSDirIterator(itr PBLinkItr, transformName TransformNameFunc) *UnixFSDir__Itr { +func NewUnixFSDirIterator(itr pbLinkItr, transformName TransformNameFunc) *UnixFSDir__Itr { return &UnixFSDir__Itr{itr, transformName} } func (itr *UnixFSDir__Itr) Next() (k dagpb.String, v dagpb.Link) {