summaryrefslogtreecommitdiff
path: root/model/recipe.go
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2024-05-09 11:13:46 +0200
committerxengineering <me@xengineering.eu>2024-05-09 11:13:46 +0200
commitfd7ee91110cf1de780f3c46822dd69385b3b6318 (patch)
treea995ff74fc46fed094c921f320b31df53212acff /model/recipe.go
parenta2038b0ea35d1466c84e6e04a2e4597fc038815a (diff)
downloadceres-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