refactor(ItemList): Incluseive -> Inclusive (#3673)
Signed-off-by: Ryan Russell <git@ryanrussell.org> Signed-off-by: Ryan Russell <git@ryanrussell.org>
This commit is contained in:
@@ -325,13 +325,13 @@ func (nl *ItemList) ListNames(startFrom string, visitNamesFn func(name string) b
|
|||||||
}
|
}
|
||||||
|
|
||||||
if prevNode != nil {
|
if prevNode != nil {
|
||||||
if !nl.NodeScanIncluseiveAfter(prevNode.Reference(), startFrom, visitNamesFn) {
|
if !nl.NodeScanInclusiveAfter(prevNode.Reference(), startFrom, visitNamesFn) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for nextNode != nil {
|
for nextNode != nil {
|
||||||
if !nl.NodeScanIncluseiveAfter(nextNode.Reference(), startFrom, visitNamesFn) {
|
if !nl.NodeScanInclusiveAfter(nextNode.Reference(), startFrom, visitNamesFn) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
nextNode, err = nl.skipList.LoadElement(nextNode.Next[0])
|
nextNode, err = nl.skipList.LoadElement(nextNode.Next[0])
|
||||||
@@ -429,7 +429,7 @@ func (nl *ItemList) NodeMin(node *skiplist.SkipListElementReference) string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (nl *ItemList) NodeScanIncluseiveAfter(node *skiplist.SkipListElementReference, startFrom string, visitNamesFn func(name string) bool) bool {
|
func (nl *ItemList) NodeScanInclusiveAfter(node *skiplist.SkipListElementReference, startFrom string, visitNamesFn func(name string) bool) bool {
|
||||||
key := fmt.Sprintf("%s%dm", nl.prefix, node.ElementPointer)
|
key := fmt.Sprintf("%s%dm", nl.prefix, node.ElementPointer)
|
||||||
if startFrom == "" {
|
if startFrom == "" {
|
||||||
startFrom = "-"
|
startFrom = "-"
|
||||||
|
|||||||
Reference in New Issue
Block a user