mirror of
https://github.com/etcd-io/bbolt.git
synced 2025-05-31 11:42:30 +00:00
Update Bucket.Get documentation
Signed-off-by: Cenk Alti <cenkalti@gmail.com>
This commit is contained in:
parent
8ebdaf8d2c
commit
3f7812656f
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user