From 3f7812656f9a07c1c78658ec32110c6afae73e90 Mon Sep 17 00:00:00 2001 From: Cenk Alti Date: Sun, 18 Jun 2023 20:27:01 -0400 Subject: [PATCH] Update Bucket.Get documentation Signed-off-by: Cenk Alti --- bucket.go | 1 + 1 file changed, 1 insertion(+) diff --git a/bucket.go b/bucket.go index b1c1b85..6a3c48a 100644 --- a/bucket.go +++ b/bucket.go @@ -248,6 +248,7 @@ func (b *Bucket) DeleteBucket(key []byte) error { // Get retrieves the value for a key in the bucket. // Returns a nil value if the key does not exist or if the key is a nested bucket. // The returned value is only valid for the life of the transaction. +// The returned memory is owned by bbolt and must never be modified; writing to this memory might corrupt the database. func (b *Bucket) Get(key []byte) []byte { k, v, flags := b.Cursor().seek(key)