Skip to content

Commit

Permalink
moving appending WITHSCORES to baseclient
Browse files Browse the repository at this point in the history
Signed-off-by: TJ Zhang <[email protected]>
  • Loading branch information
TJ Zhang committed Feb 1, 2025
1 parent 210e4dd commit 855a313
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 3 additions & 2 deletions go/api/base_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -7179,11 +7179,12 @@ func (client *baseClient) ZInter(keys options.KeyArray) ([]string, error) {
// fmt.Println(res) // map[member1:1.0 member2:2.0 member3:3.0]
//
// [valkey.io]: https://valkey.io/commands/zinter/
func (client *baseClient) ZInterWithScores(options *options.ZInterOptions) (map[string]float64, error) {
args, err := options.ToArgs()
func (client *baseClient) ZInterWithScores(zInterOptions *options.ZInterOptions) (map[string]float64, error) {
args, err := zInterOptions.ToArgs()
if err != nil {
return nil, err
}
args = append(args, options.WithScores)
result, err := client.executeCommand(C.ZInter, args)
if err != nil {
return nil, err
Expand Down
2 changes: 0 additions & 2 deletions go/api/options/zinter_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,5 @@ func (options *ZInterOptions) ToArgs() ([]string, error) {
args = append(args, options.aggregate.ToArgs()...)
}

args = append(args, WithScores)

return args, nil
}

0 comments on commit 855a313

Please sign in to comment.