1
0
mirror of https://github.com/redis/go-redis.git synced 2025-06-12 14:21:52 +03:00

Add basic BITFIELD support

This commit is contained in:
Vladimir Mihailenco
2019-06-26 14:45:38 +03:00
parent 4a3dbb3251
commit bbe0a59db3
3 changed files with 439 additions and 481 deletions

View File

@ -968,6 +968,12 @@ var _ = Describe("Commands", func() {
Expect(pos).To(Equal(int64(-1)))
})
It("should BitField", func() {
nn, err := client.BitField("mykey", "INCRBY", "i5", 100, 1, "GET", "u4", 0).Result()
Expect(err).NotTo(HaveOccurred())
Expect(nn).To(Equal([]int64{1, 0}))
})
It("should Decr", func() {
set := client.Set("key", "10", 0)
Expect(set.Err()).NotTo(HaveOccurred())