@@ -15,8 +15,8 @@ type BitMapCmdable interface {
1515 BitOpNot (ctx context.Context , destKey string , key string ) * IntCmd
1616 BitPos (ctx context.Context , key string , bit int64 , pos ... int64 ) * IntCmd
1717 BitPosSpan (ctx context.Context , key string , bit int8 , start , end int64 , span string ) * IntCmd
18- BitField (ctx context.Context , key string , values ... interface {} ) * IntSliceCmd
19- BitFieldRO (ctx context.Context , key string , values ... interface {} ) * IntSliceCmd
18+ BitField (ctx context.Context , key string , values ... any ) * IntSliceCmd
19+ BitFieldRO (ctx context.Context , key string , values ... any ) * IntSliceCmd
2020}
2121
2222func (c cmdable ) GetBit (ctx context.Context , key string , offset int64 ) * IntCmd {
@@ -66,7 +66,7 @@ func (c cmdable) BitCount(ctx context.Context, key string, bitCount *BitCount) *
6666}
6767
6868func (c cmdable ) bitOp (ctx context.Context , op , destKey string , keys ... string ) * IntCmd {
69- args := make ([]interface {} , 3 + len (keys ))
69+ args := make ([]any , 3 + len (keys ))
7070 args [0 ] = "bitop"
7171 args [1 ] = op
7272 args [2 ] = destKey
@@ -97,7 +97,7 @@ func (c cmdable) BitOpNot(ctx context.Context, destKey string, key string) *IntC
9797// BitPos is an API before Redis version 7.0, cmd: bitpos key bit start end
9898// if you need the `byte | bit` parameter, please use `BitPosSpan`.
9999func (c cmdable ) BitPos (ctx context.Context , key string , bit int64 , pos ... int64 ) * IntCmd {
100- args := make ([]interface {} , 3 + len (pos ))
100+ args := make ([]any , 3 + len (pos ))
101101 args [0 ] = "bitpos"
102102 args [1 ] = key
103103 args [2 ] = bit
@@ -131,9 +131,9 @@ func (c cmdable) BitPosSpan(ctx context.Context, key string, bit int8, start, en
131131// BitField accepts multiple values:
132132// - BitField("set", "i1", "offset1", "value1","cmd2", "type2", "offset2", "value2")
133133// - BitField([]string{"cmd1", "type1", "offset1", "value1","cmd2", "type2", "offset2", "value2"})
134- // - BitField([]interface{} {"cmd1", "type1", "offset1", "value1","cmd2", "type2", "offset2", "value2"})
135- func (c cmdable ) BitField (ctx context.Context , key string , values ... interface {} ) * IntSliceCmd {
136- args := make ([]interface {} , 2 , 2 + len (values ))
134+ // - BitField([]any {"cmd1", "type1", "offset1", "value1","cmd2", "type2", "offset2", "value2"})
135+ func (c cmdable ) BitField (ctx context.Context , key string , values ... any ) * IntSliceCmd {
136+ args := make ([]any , 2 , 2 + len (values ))
137137 args [0 ] = "bitfield"
138138 args [1 ] = key
139139 args = appendArgs (args , values )
@@ -145,8 +145,8 @@ func (c cmdable) BitField(ctx context.Context, key string, values ...interface{}
145145// BitFieldRO - Read-only variant of the BITFIELD command.
146146// It is like the original BITFIELD but only accepts GET subcommand and can safely be used in read-only replicas.
147147// - BitFieldRO(ctx, key, "<Encoding0>", "<Offset0>", "<Encoding1>","<Offset1>")
148- func (c cmdable ) BitFieldRO (ctx context.Context , key string , values ... interface {} ) * IntSliceCmd {
149- args := make ([]interface {} , 2 , 2 + len (values ))
148+ func (c cmdable ) BitFieldRO (ctx context.Context , key string , values ... any ) * IntSliceCmd {
149+ args := make ([]any , 2 , 2 + len (values ))
150150 args [0 ] = "BITFIELD_RO"
151151 args [1 ] = key
152152 if len (values )% 2 != 0 {
0 commit comments