Skip to content

Commit 3c79c72

Browse files
committed
Find raw
1 parent 122ab17 commit 3c79c72

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

hamt.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,15 @@ func (n *Node) Find(ctx context.Context, k string, out interface{}) error {
8686
})
8787
}
8888

89+
func (n *Node) FindRaw(ctx context.Context, k string) ([]byte, error) {
90+
var ret []byte
91+
err := n.getValue(ctx, &hashBits{b: hash(k)}, k, func(kv *KV) error {
92+
ret = kv.Value.Raw
93+
return nil
94+
})
95+
return ret, err
96+
}
97+
8998
func (n *Node) Delete(ctx context.Context, k string) error {
9099
return n.modifyValue(ctx, &hashBits{b: hash(k)}, k, nil)
91100
}

0 commit comments

Comments
 (0)