-
Notifications
You must be signed in to change notification settings - Fork 65
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
base: main
Are you sure you want to change the base?
Go: Implement GetBit, SetBit, BitCount and Wait commands #2918
Conversation
Signed-off-by: Niharika Bhavaraju <[email protected]>
Signed-off-by: Niharika Bhavaraju <[email protected]>
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()", |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
// is The index offset type. Could be either {@link BitmapIndexType#BIT} or | ||
// {@link BitmapIndexType#BYTE}. |
There was a problem hiding this comment.
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)
// 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 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
Go: Implement GetBit, SetBit, BitCount and Wait commands