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 iter.Seq2 for *FieldValue #625

Merged
merged 3 commits into from
Aug 30, 2024
Merged

Support iter.Seq2 for *FieldValue #625

merged 3 commits into from
Aug 30, 2024

Conversation

tamayika
Copy link
Contributor

@tamayika tamayika commented Aug 30, 2024

closes #355

I added iter.Seq2 support for HSET, HMSET, XADD which have FieldValue() method.
We must support < go 1.23, so we must split file to other files.
It's hard to support auto generation because current implementation does not support code splitting.
So I hand-written the implementation.
When go version in go.mod is go 1.23, I think we can support auto generation by adding flags to *.json and its structs.

Consideration

I named FieldValues, but this is maybe not good to support auto generation in the future because we must consider plural form correctly.
Is FieldValueSeq better?

@rueian
Copy link
Collaborator

rueian commented Aug 30, 2024

Is FieldValueSeq better?

I think your original FieldValueIter is better.

@tamayika tamayika requested a review from rueian August 30, 2024 12:37
@rueian rueian merged commit c7264b6 into redis:main Aug 30, 2024
27 checks passed
@tamayika tamayika deleted the feature/355 branch August 30, 2024 23:37
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.

Support Go 1.23 range over func in internal/cmds
2 participants