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

fix: Use model.Type() as cache key instead of model itself #62

Merged
merged 2 commits into from
Jul 27, 2023

Conversation

max-stytch
Copy link
Contributor

Fix for #61

Type values are comparable, such as with the == operator, so they can be used as map keys. Two Type values are equal if they represent identical types.

From https://pkg.go.dev/reflect#Type

@coveralls
Copy link

coveralls commented Jul 27, 2023

Coverage Status

coverage: 98.8% (+0.01%) from 98.79% when pulling 766c9a4 on max-stytch:max/fix-mem-leak into 0eac140 on blockloop:master.

@blockloop
Copy link
Owner

This looks great. I was actually just writing a fix for it. Thank you for this PR.

@blockloop blockloop merged commit 3e43b34 into blockloop:master Jul 27, 2023
@blockloop
Copy link
Owner

I just cut v2.2.0 with this patch. Thanks again

@max-stytch
Copy link
Contributor Author

Thank you!

@max-stytch max-stytch deleted the max/fix-mem-leak branch July 27, 2023 22:06
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

Successfully merging this pull request may close these issues.

3 participants