Update Bucket.Get documentation

Signed-off-by: Cenk Alti <cenkalti@gmail.com>
pull/498/head
Cenk Alti 2023-06-18 20:27:01 -04:00
parent 8ebdaf8d2c
commit 3f7812656f
No known key found for this signature in database
GPG Key ID: 2DB2EA6FD1BF1761
1 changed files with 1 additions and 0 deletions

View File

@ -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)