WithPrefix sets the comparison to scan all keys prefixed by the key.
()
| 117 | |
| 118 | // WithPrefix sets the comparison to scan all keys prefixed by the key. |
| 119 | func (cmp Cmp) WithPrefix() Cmp { |
| 120 | cmp.RangeEnd = getPrefix(cmp.Key) |
| 121 | return cmp |
| 122 | } |
| 123 | |
| 124 | // mustInt64 panics if val isn't an int or int64. It returns an int64 otherwise. |
| 125 | func mustInt64(val any) int64 { |