diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/dedo.go | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/dedo.go b/src/dedo.go index 4398c4f..ef626ee 100644 --- a/src/dedo.go +++ b/src/dedo.go @@ -1982,13 +1982,6 @@ func (db *DB) close() error { /// /// IMPORTANT: You must close read-only transactions after you are finished or /// else the database will not reclaim old pages. -func (db *DB) begin(writable bool) (*Tx, error) { - if writable { - return db.beginRWTx() - } else { - return db.beginTx() - } -} func (db *DB) beginTx() (*Tx, error) { // Lock the meta pages while we initialize the transaction. We obtain @@ -2088,7 +2081,7 @@ func (db *DB) removeTx(tx *Tx) { /// Attempting to manually commit or rollback within the function will cause a /// panic. func (db *DB) Update(fn func(TransactionI) error) error { - t, err := db.begin(true) + t, err := db.beginRWTx() if err != nil { return err } @@ -2117,7 +2110,7 @@ func (db *DB) Update(fn func(TransactionI) error) error { /// /// Attempting to manually rollback within the function will cause a panic. func (db *DB) View(fn func(SnapshotI) error) error { - t, err := db.begin(false) + t, err := db.beginTx() if err != nil { return err } |