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

How KVStore use generic to store data #1397

Open
libchaos opened this issue Jan 18, 2025 · 0 comments
Open

How KVStore use generic to store data #1397

libchaos opened this issue Jan 18, 2025 · 0 comments

Comments

@libchaos
Copy link

I want to use different data type in kvstore, not only string data type, how to implement like this

type Score struct {
  level int
  time time.Time
}
err := ctx.KVStore[uint32, Score].Set(1, &Score{level:1, time: time.Now()})
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

1 participant