From 14acf9bf96a2074db1d405de1d0d54e6f41acd9c Mon Sep 17 00:00:00 2001 From: ofekshenawa Date: Sat, 6 Jan 2024 15:12:55 +0200 Subject: [PATCH] Change Z Member type to interface --- commands_test.go | 8 ++++---- sortedset_commands.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/commands_test.go b/commands_test.go index af8b0c62f..3d2ebf514 100644 --- a/commands_test.go +++ b/commands_test.go @@ -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))) diff --git a/sortedset_commands.go b/sortedset_commands.go index 7e96e1ebf..670140270 100644 --- a/sortedset_commands.go +++ b/sortedset_commands.go @@ -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.