From 004fa5f3a7ff6b7e003e3a84930b82341e644b89 Mon Sep 17 00:00:00 2001 From: Bryer <0xbryer@gmail.com> Date: Sat, 22 Feb 2025 17:53:58 +0200 Subject: [PATCH] chore: fixed gramm error in txDeferRollback function comment --- rules.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules.go b/rules.go index 6f378fa5579..6fbc6292a9c 100644 --- a/rules.go +++ b/rules.go @@ -60,7 +60,7 @@ func txDeferRollback(m dsl.Matcher) { Where(!m["rollback"].Text.Matches(`defer .*\.Rollback()`)). //At(m["rollback"]). Report(`Add "defer $tx.Rollback()" right after transaction creation error check. - If you are in the loop - consider use "$db.View" or "$db.Update" or extract whole transaction to function. + If you are in the loop - consider using "$db.View" or "$db.Update" or extracting the whole transaction to a function. Without rollback in defer - app can deadlock on error or panic. Rules are in ./rules.go file. `)