prevSibling returns the previous node with the same parent.
()
| 103 | |
| 104 | // prevSibling returns the previous node with the same parent. |
| 105 | func (n *node) prevSibling() *node { |
| 106 | if n.parent == nil { |
| 107 | return nil |
| 108 | } |
| 109 | index := n.parent.childIndex(n) |
| 110 | if index == 0 { |
| 111 | return nil |
| 112 | } |
| 113 | return n.parent.childAt(index - 1) |
| 114 | } |
| 115 | |
| 116 | // put inserts a key/value. |
| 117 | func (n *node) put(oldKey, newKey, value []byte, pgId common.Pgid, flags uint32) { |
no test coverage detected