Hacker News new | ask | show | jobs
by majodev 2118 days ago
Great points! Any hints regarding preexisting linters for go code that errors if we execute outside (an already opened) db transaction?

Also, regarding writing tests against real PostgreSQL databases, isolated per test and without losing speed, I can recommend to take a look at https://github.com/allaboutapps/integresql - disclaimer, we are the authors.

1 comments

> Great points! Any hints regarding preexisting linters for go code that errors if we execute outside (an already opened) db transaction?

I'm limiting the open connections at the moment and using the default Goland linter. It won't show you these kind of errors though and I just remembered that I saw it somewhere else, but I don't remember where it was :D

You might be thinking of https://github.com/ryanrolds/sqlclosecheck but it will only catch leaks, not deadlocks.