redis / go-redis

Redis Go client
https://redis.uptrace.dev
BSD 2-Clause "Simplified" License
19.96k stars 2.36k forks source link

BITCOUNT not support bit option #2879

Closed kay011 closed 7 months ago

kay011 commented 8 months ago

From version 7.0.0, Redis added the BYTE|BIT option for BITCOUNT.

For example:

127.0.0.1:6379> setbit mykey 7 1
(integer) 0
127.0.0.1:6379> setbit mykey 6 1
(integer) 0
127.0.0.1:6379> bitcount mykey 6 7 
(integer) 0
127.0.0.1:6379> bitcount mykey 6 7 bit
(integer) 2
127.0.0.1:6379> bitcount mykey 6 7 byte
(integer) 0

But go-redis does't support this option in lastest version.

tzq0301 commented 7 months ago

Can be closed by https://github.com/redis/go-redis/pull/2887