RPop removes and returns the last element of the list stored in the bucket at given bucket and key.
(bucket string, key []byte)
| 48 | |
| 49 | // RPop removes and returns the last element of the list stored in the bucket at given bucket and key. |
| 50 | func (tx *Tx) RPop(bucket string, key []byte) (item []byte, err error) { |
| 51 | item, err = tx.RPeek(bucket, key) |
| 52 | if err != nil { |
| 53 | return |
| 54 | } |
| 55 | |
| 56 | return item, tx.push(bucket, key, DataRPopFlag, item) |
| 57 | } |
| 58 | |
| 59 | // RPeek returns the last element of the list stored in the bucket at given bucket and key. |
| 60 | func (tx *Tx) RPeek(bucket string, key []byte) ([]byte, error) { |