diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-04-04 12:03:04 -0600 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-04-04 12:03:04 -0600 |
commit | 12204df0b5aaad6aeb0f498b702b0fa375fc4f95 (patch) | |
tree | 8cfb509c6e5c4bbc60f5ae4c036644342dbac899 /db.go | |
parent | Merge pull request #118 from benbjohnson/commit-hook (diff) | |
download | dedo-12204df0b5aaad6aeb0f498b702b0fa375fc4f95.tar.gz dedo-12204df0b5aaad6aeb0f498b702b0fa375fc4f95.tar.xz |
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.
Diffstat (limited to 'db.go')
-rw-r--r-- | db.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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. |