diff options
author | xengineering <me@xengineering.eu> | 2024-05-09 11:13:46 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2024-05-09 11:13:46 +0200 |
commit | fd7ee91110cf1de780f3c46822dd69385b3b6318 (patch) | |
tree | a995ff74fc46fed094c921f320b31df53212acff /model/recipe.go | |
parent | a2038b0ea35d1466c84e6e04a2e4597fc038815a (diff) | |
download | ceres-fd7ee91110cf1de780f3c46822dd69385b3b6318.tar ceres-fd7ee91110cf1de780f3c46822dd69385b3b6318.tar.zst ceres-fd7ee91110cf1de780f3c46822dd69385b3b6318.zip |
model: Use defer for tx.Rollback()
A committed transaction cannot be rolled back. Using defer to roll back
guarantees that the transaction is always rolled back if not the commit
in the last line of model.Transaction was excuted.
[1]: https://go.dev/doc/database/execute-transactions
Diffstat (limited to 'model/recipe.go')
0 files changed, 0 insertions, 0 deletions