mirror of https://github.com/etcd-io/bbolt.git
Update Bucket.Get documentation
Signed-off-by: Cenk Alti <cenkalti@gmail.com>pull/498/head
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…
Reference in New Issue