(tx *bolt.Tx, bucket []byte, key []byte)
| 502 | } |
| 503 | |
| 504 | func executeDelete(tx *bolt.Tx, bucket []byte, key []byte) (historyRecord, error) { |
| 505 | var rec historyRecord |
| 506 | |
| 507 | b := tx.Bucket(bucket) |
| 508 | |
| 509 | err := b.Delete(key) |
| 510 | if err == nil { |
| 511 | rec = historyRecord{ |
| 512 | OperationType: Delete, |
| 513 | Bucket: string(bucket), |
| 514 | Key: string(key), |
| 515 | Txid: tx.ID(), |
| 516 | } |
| 517 | } |
| 518 | |
| 519 | return rec, err |
| 520 | } |
| 521 | |
| 522 | func randomDurationInRange(min, max time.Duration) time.Duration { |
| 523 | d := int64(max) - int64(min) |
no test coverage detected