childIndex returns the index of a given child node.
(child *node)
| 80 | |
| 81 | // childIndex returns the index of a given child node. |
| 82 | func (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. |
| 88 | func (n *node) numChildren() int { |
no test coverage detected