Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check Row.Scan calls #16

Open
Lumaraf opened this issue Nov 18, 2021 · 1 comment
Open

Check Row.Scan calls #16

Lumaraf opened this issue Nov 18, 2021 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Lumaraf
Copy link

Lumaraf commented Nov 18, 2021

The sql.Row structs returned by the QueryRow methods contain a reference to a sql.Rows instance that is only closed when Scan is called. (see https://cs.opensource.google/go/go/+/refs/tags/go1.17.3:src/database/sql/sql.go;l=3326) Thus i think that this linter should also look for missing Row.Scan calls which would cause the same problems as missing Rows.Close calls.

@ryanrolds
Copy link
Owner

Thank you for raising this. I'm adding this to the list of improvements to make.

@ryanrolds ryanrolds added enhancement New feature or request good first issue Good for newcomers labels Aug 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants