MCPcopy
hub / github.com/etcd-io/bbolt / nextSibling

Method nextSibling

node.go:93–102  ·  view source on GitHub ↗

nextSibling returns the next node with the same parent.

()

Source from the content-addressed store, hash-verified

91
92// nextSibling returns the next node with the same parent.
93func (n *node) nextSibling() *node {
94 if n.parent == nil {
95 return nil
96 }
97 index := n.parent.childIndex(n)
98 if index >= n.parent.numChildren()-1 {
99 return nil
100 }
101 return n.parent.childAt(index + 1)
102}
103
104// prevSibling returns the previous node with the same parent.
105func (n *node) prevSibling() *node {

Callers 1

rebalanceMethod · 0.95

Calls 3

childIndexMethod · 0.80
numChildrenMethod · 0.80
childAtMethod · 0.80

Tested by

no test coverage detected