Skip to content

Commit 6278a65

Browse files
committed
Fix panic on put
1 parent c5fd572 commit 6278a65

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/client/client_put.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ func (c *client) Put(ctx context.Context, prefix string, value []byte, opOpts ..
5555
Value: value,
5656
PrevValue: resp.PrevKv.Value,
5757
}
58+
} else {
59+
r = &KeyValue{
60+
Key: []byte(prefix),
61+
Value: value,
62+
}
5863
}
5964
err = opt.response(r)
6065
if err != nil {

0 commit comments

Comments
 (0)