mirror of https://github.com/hak5/bolt.git
Merge pull request #441 from pmezard/document-put-constraint
bucket: document Put() value must remain valid for the transactionmaster
commit
54e1e44866
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue