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

Revert #2818 due to it be a breaking change #2861

Merged
merged 1 commit into from
Jan 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3733,28 +3733,28 @@ var _ = Describe("Commands", func() {
It("should ZAdd bytes", func() {
added, err := client.ZAdd(ctx, "zset", redis.Z{
Score: 1,
Member: "one",
Member: []byte("one"),
}).Result()
Expect(err).NotTo(HaveOccurred())
Expect(added).To(Equal(int64(1)))

added, err = client.ZAdd(ctx, "zset", redis.Z{
Score: 1,
Member: "uno",
Member: []byte("uno"),
}).Result()
Expect(err).NotTo(HaveOccurred())
Expect(added).To(Equal(int64(1)))

added, err = client.ZAdd(ctx, "zset", redis.Z{
Score: 2,
Member: "two",
Member: []byte("two"),
}).Result()
Expect(err).NotTo(HaveOccurred())
Expect(added).To(Equal(int64(1)))

added, err = client.ZAdd(ctx, "zset", redis.Z{
Score: 3,
Member: "two",
Member: []byte("two"),
}).Result()
Expect(err).NotTo(HaveOccurred())
Expect(added).To(Equal(int64(0)))
Expand Down
2 changes: 1 addition & 1 deletion sortedset_commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ func (c cmdable) ZScan(ctx context.Context, key string, cursor uint64, match str
// Z represents sorted set member.
type Z struct {
Score float64
Member string
Member interface{}
}

// ZWithKey represents sorted set member including the name of the key where it was popped.
Expand Down
Loading