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 out generics implementation #114

Open
rlshukhov opened this issue Jan 24, 2025 · 1 comment
Open

Check out generics implementation #114

rlshukhov opened this issue Jan 24, 2025 · 1 comment

Comments

@rlshukhov
Copy link

GenericHold

I made an extension for BadgerHold allowing you to use it with generics support, for my pet projects:
https://github.com/rlshukhov/generichold

Examples

BadgerHold

var item Item
err := store.Get(key, &item)

GenericHold:

item, err := store.Get(key)

BadgerHold:

count, err := store.Count(&Item{}, nil)

GenericHold:

count, err := store.Count(nil)

Tests

And yes, it's pass all BadgerHold unit tests.

@timshannon
Copy link
Owner

Very cool

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