From 112f14363169288b9e111025703b7459b450469e Mon Sep 17 00:00:00 2001 From: Ben Johnson Date: Tue, 24 Mar 2015 11:06:28 -0600 Subject: 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. --- bucket.go | 1 + 1 file changed, 1 insertion(+) (limited to 'bucket.go') diff --git a/bucket.go b/bucket.go index 470689b..6766992 100644 --- a/bucket.go +++ b/bucket.go @@ -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) -- cgit v1.2.3