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

Method childIndex

node.go:82–85  ·  view source on GitHub ↗

childIndex returns the index of a given child node.

(child *node)

Source from the content-addressed store, hash-verified

80
81// childIndex returns the index of a given child node.
82func (n *node) childIndex(child *node) int {
83 index := sort.Search(len(n.inodes), func(i int) bool { return bytes.Compare(n.inodes[i].Key(), child.key) != -1 })
84 return index
85}
86
87// numChildren returns the number of children.
88func (n *node) numChildren() int {

Callers 3

nextSiblingMethod · 0.80
prevSiblingMethod · 0.80
rebalanceMethod · 0.80

Calls 1

KeyMethod · 0.45

Tested by

no test coverage detected