fix: Use model.Type() as cache key instead of model itself by max-stytch · Pull Request #62 · blockloop/scan · GitHub
Skip to content

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

Merged
blockloop merged 2 commits into
blockloop:masterfrom
max-stytch:max/fix-mem-leak
Jul 27, 2023
Merged

fix: Use model.Type() as cache key instead of model itself#62
blockloop merged 2 commits into
blockloop:masterfrom
max-stytch:max/fix-mem-leak

Conversation

@max-stytch

Copy link
Copy Markdown
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

coveralls commented Jul 27, 2023

Copy link
Copy Markdown

@blockloop

Copy link
Copy Markdown
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
Copy Markdown
Owner

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

@max-stytch

Copy link
Copy Markdown
Contributor Author

@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