Skip to content

Commit 122ab17

Browse files
committed
SetRaw
1 parent 99b8553 commit 122ab17

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

hamt.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,12 @@ func (n *Node) Flush(ctx context.Context) error {
203203
return nil
204204
}
205205

206+
// SetRaw sets key k to cbor bytes raw
207+
func (n *Node) SetRaw(ctx context.Context, k string, raw []byte) error {
208+
d := &cbg.Deferred{Raw: raw}
209+
return n.modifyValue(ctx, &hashBits{b: hash(k)}, k, d)
210+
}
211+
206212
func (n *Node) Set(ctx context.Context, k string, v interface{}) error {
207213
var d *cbg.Deferred
208214

0 commit comments

Comments
 (0)