Skip to content

Linter that confirms that DB rows and stats are closed properly.

License

Notifications You must be signed in to change notification settings

nirhaas/sqlclosecheck

 
 

Repository files navigation

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.

About

Linter that confirms that DB rows and stats are closed properly.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 92.2%
  • Makefile 7.8%