core: add flags to Storage.Find
It can be iterated over keys, values or both. Prefix can be stripped.
This commit is contained in:
parent
2130e17f0c
commit
7fc0c04dba
8 changed files with 148 additions and 24 deletions
|
@ -32,7 +32,7 @@ func Delete(key []byte) bool {
|
|||
|
||||
// Find returns an array of key-value pairs with key that matched the passed value
|
||||
func Find(value []byte) []string {
|
||||
iter := storage.Find(ctx, value)
|
||||
iter := storage.Find(ctx, value, storage.None)
|
||||
result := []string{}
|
||||
for iterator.Next(iter) {
|
||||
val := iterator.Value(iter).([]string)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue