boltdb/bolt — pull request #81 by benbjohnson (2014-03-23 18:23:43+00:00)
Title: Add ErrTxClosed error.

Commit/Rollback and mutable calls on Tx and Bucket now return ErrTxClosed if the transaction has already been committed or rolled back. Non-mutable calls have added an assertion to check if the transaction is closed which will cause a panic. I don't want to introduce an error return for accessor methods that are being used improperly so I think the panic is appropriate.

This PR also changes `Commit()` so that it returns `ErrTxNotWritable` if called on a read-only `Tx`.

Fixes: #73

/cc @tv42