-
Notifications
You must be signed in to change notification settings - Fork 67
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: Add command ZScan #2950
base: main
Are you sure you want to change the base?
Go: Add command ZScan #2950
Conversation
Signed-off-by: TJ Zhang <[email protected]>
8d058cc
to
38d5844
Compare
@@ -1630,3 +1630,28 @@ func (client *baseClient) XLen(key string) (Result[int64], error) { | |||
} | |||
return handleLongResponse(result) | |||
} | |||
|
|||
func (client *baseClient) ZScan(key string, cursor string) (Result[string], []Result[string], error) { |
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.
Move docs there please
func (zScanOptions *ZScanOptions) SetMatch(match string) *ZScanOptions { | ||
zScanOptions.BaseScanOptions.SetMatch(match) | ||
return zScanOptions | ||
} | ||
|
||
func (zScanOptions *ZScanOptions) SetCount(count int64) *ZScanOptions { |
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.
Add docs to these methods
fmt.Println("_____________________") | ||
fmt.Println(resCollection) |
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.
Remove
if err != nil { | ||
return CreateNilStringResult(), nil, err | ||
} | ||
return handleScanResponse(result) |
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.
Could you update please handleScanResponse
to return (string, []string, error)
? Those strings are never nil
.
You can do it in another PR
Issue link
This Pull Request is linked to issue (URL): #2878
Checklist
Before submitting the PR make sure the following are checked: