diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2015-03-24 11:06:28 -0600 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2015-03-24 11:06:28 -0600 |
commit | 112f14363169288b9e111025703b7459b450469e (patch) | |
tree | 3fbae5dd45ba44c7479ff9c4609f0362b946c224 /bucket.go | |
parent | Merge pull request #330 from benbjohnson/tx-writer-to (diff) | |
download | dedo-112f14363169288b9e111025703b7459b450469e.tar.gz dedo-112f14363169288b9e111025703b7459b450469e.tar.xz |
Document key/value safety.
This commit adds safety documentation to the data accessor functions
in Bolt as well as the README. This was documented once in the package
level godoc but it's important enough that it should be more clear.
Diffstat (limited to 'bucket.go')
-rw-r--r-- | bucket.go | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -252,6 +252,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. func (b *Bucket) Get(key []byte) []byte { k, v, flags := b.Cursor().seek(key) |