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 <[email protected]>
1 parent 865b93a commit b673fb7

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

go.mod

+1-1
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

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/testdata/sqlclosecheck.go

+3-3
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)