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

doc: state whether or not rows need to be closed #12

Closed
shaunc opened this issue Mar 19, 2019 · 2 comments
Closed

doc: state whether or not rows need to be closed #12

shaunc opened this issue Mar 19, 2019 · 2 comments

Comments

@shaunc
Copy link

shaunc commented Mar 19, 2019

The documentation includes an example of using query rows without defer rows.Close() -- glancing at the code, this doesn't seem correct, but perhaps I'm wrong. Either way, the doc should say.

Thanks for the package!

@joho joho closed this as completed in a9e6f98 Mar 21, 2019
@joho
Copy link
Owner

joho commented Mar 21, 2019

Thanks. You're right. I'd hoped/assumed people would see the use of rows, _ and know that the examples were in YOLO mode and shouldn't be straight copy/pasted.

Expanded one of the examples to show the right behaviour and added a caveat.

@shaunc
Copy link
Author

shaunc commented Mar 21, 2019

Thanks! I'm relatively new to go. I thought that perhaps you could be closing on the inside at first, though that would be against the standard convention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants