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
internal errors should be wrap or encapsulated? #93
Comments
Although I would accept a PR to make a more specific error type for this case, could you expand a bit on how you end up in the situation where you don't know if the reader is closed or not? In my own use, this would generally be indicative of a programming bug in the application. |
Thank you for your reply~
|
I see. For what it is worth, in situations like this one, I atomically replace the reader and rely on the finalizer to eventually close the old one. If you don't want to rely on the finalizer, you could also start a new goroutine to close it after an appropriate amount of time has passed for your use case. |
in the process of using Sometimes we needs to determine if the status of mmdb is closed or not.
Now that I'm out there judging strings, there should be a more elegant way to do it?
Looking forward to the author's recovery~
The text was updated successfully, but these errors were encountered: