Merge pull request #441 from pmezard/document-put-constraint

bucket: document Put() value must remain valid for the transaction
master
Ben Johnson 2015-10-28 11:54:20 -06:00
commit 54e1e44866
1 changed files with 1 additions and 0 deletions

View File

@ -273,6 +273,7 @@ func (b *Bucket) Get(key []byte) []byte {
// Put sets the value for a key in the bucket.
// If the key exist then its previous value will be overwritten.
// Supplied value must remain valid for the life of the transaction.
// Returns an error if the bucket was created from a read-only transaction, if the key is blank, if the key is too large, or if the value is too large.
func (b *Bucket) Put(key []byte, value []byte) error {
if b.tx.db == nil {