Skip to content

Commit b673fb7

Browse files
build(deps): bump github.com/ryanrolds/sqlclosecheck from 0.4.0 to 0.5.1 (#4071)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
1 parent 865b93a commit b673fb7

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ require (
8181
github.com/polyfloyd/go-errorlint v1.4.4
8282
github.com/quasilyte/go-ruleguard/dsl v0.3.22
8383
github.com/ryancurrah/gomodguard v1.3.0
84-
github.com/ryanrolds/sqlclosecheck v0.4.0
84+
github.com/ryanrolds/sqlclosecheck v0.5.1
8585
github.com/sanposhiho/wastedassign/v2 v2.0.7
8686
github.com/sashamelentyev/interfacebloat v1.1.0
8787
github.com/sashamelentyev/usestdlibvars v1.24.0

go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/testdata/sqlclosecheck.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func rowsCorrectDefer() {
6868
}
6969

7070
func rowsMissingClose() {
71-
rows, err := db.QueryContext(ctx, "SELECT name FROM users WHERE age=?", age) // want "Rows/Stmt was not closed"
71+
rows, err := db.QueryContext(ctx, "SELECT name FROM users WHERE age=?", age) // want "Rows/Stmt/NamedStmt was not closed"
7272
if err != nil {
7373
log.Fatal(err)
7474
}
@@ -91,7 +91,7 @@ func rowsMissingClose() {
9191
}
9292

9393
func rowsMissingCloseG[T ~int64](db *sql.DB, a T) {
94-
rows, _ := db.Query("select id from tb") // want "Rows/Stmt was not closed"
94+
rows, _ := db.Query("select id from tb") // want "Rows/Stmt/NamedStmt was not closed"
9595
for rows.Next() {
9696
// ...
9797
}
@@ -208,7 +208,7 @@ func stmtCorrectDefer() {
208208

209209
func stmtMissingClose() {
210210
// In normal use, create one Stmt when your process starts.
211-
stmt, err := db.PrepareContext(ctx, "SELECT username FROM users WHERE id = ?") // want "Rows/Stmt was not closed"
211+
stmt, err := db.PrepareContext(ctx, "SELECT username FROM users WHERE id = ?") // want "Rows/Stmt/NamedStmt was not closed"
212212
if err != nil {
213213
log.Fatal(err)
214214
}

0 commit comments

Comments
 (0)