From 12204df0b5aaad6aeb0f498b702b0fa375fc4f95 Mon Sep 17 00:00:00 2001 From: Ben Johnson Date: Fri, 4 Apr 2014 12:03:04 -0600 Subject: Rename internal local Tx variables. This commit changes the local Tx variables from "t" to "tx". This is partly for consistency with external documentation but also because it just annoys me for some reason. --- db.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'db.go') diff --git a/db.go b/db.go index ee3a24b..a76639d 100644 --- a/db.go +++ b/db.go @@ -361,7 +361,7 @@ func (db *DB) beginRWTx() (*Tx, error) { } // removeTx removes a transaction from the database. -func (db *DB) removeTx(t *Tx) { +func (db *DB) removeTx(tx *Tx) { db.metalock.Lock() defer db.metalock.Unlock() @@ -369,15 +369,15 @@ func (db *DB) removeTx(t *Tx) { db.mmaplock.RUnlock() // Remove the transaction. - for i, tx := range db.txs { - if tx == t { + for i, t := range db.txs { + if t == tx { db.txs = append(db.txs[:i], db.txs[i+1:]...) break } } // Merge statistics. - db.stats.TxStats.add(&t.stats) + db.stats.TxStats.add(&tx.stats) } // Update executes a function within the context of a read-write managed transaction. -- cgit v1.2.3