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

Support Go 1.23 iterators for the ZADD command #644

Open
rueian opened this issue Oct 7, 2024 · 0 comments
Open

Support Go 1.23 iterators for the ZADD command #644

rueian opened this issue Oct 7, 2024 · 0 comments
Labels
feature good first issue Good for newcomers help wanted Extra attention is needed

Comments

@rueian
Copy link
Collaborator

rueian commented Oct 7, 2024

We support Go 1.23 iterators for HMSET, HSET, and XADD:

func (c HmsetFieldValue) FieldValueIter(seq iter.Seq2[string, string]) HmsetFieldValue {
for field, value := range seq {
c.cs.s = append(c.cs.s, field, value)
}
return c
}
func (c HsetFieldValue) FieldValueIter(seq iter.Seq2[string, string]) HsetFieldValue {
for field, value := range seq {
c.cs.s = append(c.cs.s, field, value)
}
return c
}
func (c XaddFieldValue) FieldValueIter(seq iter.Seq2[string, string]) XaddFieldValue {
for field, value := range seq {
c.cs.s = append(c.cs.s, field, value)
}
return c
}

It would be better to add support for ZADD as well.

@rueian rueian added help wanted Extra attention is needed good first issue Good for newcomers feature labels Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant