test tree foreach
This commit is contained in:
@@ -26,7 +26,7 @@ func (branch Branch) forEach(preid ID, foo func(ID, Leaf) error) error {
|
||||
return err
|
||||
}
|
||||
for id, child := range branch.Branches {
|
||||
if err := child.forEach(preid.Push(string(id)), foo); err != nil {
|
||||
if err := child.forEach(id, foo); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user