@@ -15,8 +15,8 @@ type BitMapCmdable interface {
15
15
BitOpNot (ctx context.Context , destKey string , key string ) * IntCmd
16
16
BitPos (ctx context.Context , key string , bit int64 , pos ... int64 ) * IntCmd
17
17
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
20
20
}
21
21
22
22
func (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) *
66
66
}
67
67
68
68
func (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 ))
70
70
args [0 ] = "bitop"
71
71
args [1 ] = op
72
72
args [2 ] = destKey
@@ -97,7 +97,7 @@ func (c cmdable) BitOpNot(ctx context.Context, destKey string, key string) *IntC
97
97
// BitPos is an API before Redis version 7.0, cmd: bitpos key bit start end
98
98
// if you need the `byte | bit` parameter, please use `BitPosSpan`.
99
99
func (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 ))
101
101
args [0 ] = "bitpos"
102
102
args [1 ] = key
103
103
args [2 ] = bit
@@ -131,9 +131,9 @@ func (c cmdable) BitPosSpan(ctx context.Context, key string, bit int8, start, en
131
131
// BitField accepts multiple values:
132
132
// - BitField("set", "i1", "offset1", "value1","cmd2", "type2", "offset2", "value2")
133
133
// - 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 ))
137
137
args [0 ] = "bitfield"
138
138
args [1 ] = key
139
139
args = appendArgs (args , values )
@@ -145,8 +145,8 @@ func (c cmdable) BitField(ctx context.Context, key string, values ...interface{}
145
145
// BitFieldRO - Read-only variant of the BITFIELD command.
146
146
// It is like the original BITFIELD but only accepts GET subcommand and can safely be used in read-only replicas.
147
147
// - 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 ))
150
150
args [0 ] = "BITFIELD_RO"
151
151
args [1 ] = key
152
152
if len (values )% 2 != 0 {
0 commit comments