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

Go: Implement GetBit, SetBit, BitCount and Wait commands #2918

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

niharikabhavaraju
Copy link
Contributor

Go: Implement GetBit, SetBit, BitCount and Wait commands

Signed-off-by: Niharika Bhavaraju <[email protected]>
@niharikabhavaraju niharikabhavaraju requested a review from a team as a code owner January 6, 2025 10:18
Comment on lines +42 to +44
if options.Start == nil || options.End == nil {
return options, fmt.Errorf(
"SetBitmapIndexType value cannot be set without start and end values, use SetStart() and SetEnd()",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As an option you can create factory methods for BitCountOptions: BitCountOptionsWithStart, BitCountOptionsWithStartAndEnd, BitCountOptionsWithStartEndAndType or so. This will make API more aligned with others.
You can use builder pattern as an alternative.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I don't insist on changes.

Comment on lines +81 to +82
// is The index offset type. Could be either {@link BitmapIndexType#BIT} or
// {@link BitmapIndexType#BYTE}.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix links (those are javadoc style)

Comment on lines +14 to +16
// The offset is a zero-based index, with 0 being the first element of
// the list, 1 being the next element, and so on. The offset must be
// less than 2^32 and greater than or equal to 0 If a key is
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// The offset is a zero-based index, with 0 being the first element of
// the list, 1 being the next element, and so on. The offset must be
// less than 2^32 and greater than or equal to 0 If a key is
// The offset is a zero-based index, with `0` being the first element of
// the list, `1` being the next element, and so on. The offset must be
// less than `2^32` and greater than or equal to `0` If a key is

Consider copying docs from node client

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.

2 participants