Version: `v0.5.1` Repro steps: ```go package bug_test import ( "log" "github.com/jmoiron/sqlx" ) func Example() { db, err := sqlx.Open("pgx", "postgres://localhost/db") if err != nil { log.Print(err) return } defer db.Close() rows, err := db.Queryx("SELECT * FROM users") if err != nil { log.Print(err) return } defer rows.Close() } ``` Result (from `golangci-lint`): ```shell example_test.go:17:24: Rows/Stmt/NamedStmt was not closed (sqlclosecheck) rows, err := db.Queryx("SELECT * FROM users") ```
Activity
shubhamzanwar commentedon Feb 8, 2024
➕1
we're facing the same issue in our workflows
ryanrolds commentedon Feb 8, 2024
Thank you for the report. I will take a look at this over the next few days.
shubhamzanwar commentedon Feb 20, 2024
How's it looking with this one? 🙏🏽
Bodyancheq commentedon Mar 7, 2024
+1
in my project following code worked as a solution:
also worth mentioning: when I used sql instead of sqlx, there was no error
ivanovaleksey commentedon Jun 21, 2024
Hi @ryanrolds ! Is there any progress on this issue?
disable sqlclosecheck due to ryanrolds/sqlclosecheck#35
MySQL 5.5 support (with CI fix) (#94)