go-database-sql-tutorial icon indicating copy to clipboard operation
go-database-sql-tutorial copied to clipboard

Changes to Prepare.md to compensate for unintended behaviour

Open looopTools opened this issue 7 years ago • 1 comments

By using defer tx.Rollback() a rollback will always be attempted when a function returns, which in my opinion is seems as unintended. Furthermore, using log.Fatal actually terminates the execution, which rarely is what you want to happen.

looopTools avatar Sep 26 '17 09:09 looopTools

nudge @looopTools

jeffwidman avatar Apr 06 '20 02:04 jeffwidman