Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 788 Bytes

README.md

File metadata and controls

34 lines (25 loc) · 788 Bytes

sqlclosecheck

ryanrolds

Linter that checks if SQL rows/statements are closed. Unclosed rows and statements may cause DB connection pool exhaustion.

Running

make build
make install

In your project directory:

go vet -vettool=$(which sqlclosecheck) ./...

CI

go install github.com/ryanrolds/sqlclosecheck@latest
go vet -vettool=${GOPATH}/bin/sqlclosecheck ./...

Roadmap

  • Get linter working
  • Added some basic test cases
  • Require that Close be deferred
  • Add sqlx checking
  • Test across a bunch of projects
  • Introduce linter to golangci-lint.