@@ -1989,12 +1989,10 @@ func (c cmdable) ZIncrBy(ctx context.Context, key string, increment float64, mem
19891989}
19901990
19911991func (c cmdable ) ZInterStore (ctx context.Context , destination string , store * ZStore ) * IntCmd {
1992- args := make ([]interface {}, 3 + len (store .Keys ))
1993- args [0 ] = "zinterstore"
1994- args [1 ] = destination
1995- args [2 ] = len (store .Keys )
1996- for i , key := range store .Keys {
1997- args [3 + i ] = key
1992+ args := make ([]interface {}, 0 , 3 + len (store .Keys ))
1993+ args = append (args , "zinterstore" , destination , len (store .Keys ))
1994+ for _ , key := range store .Keys {
1995+ args = append (args , key )
19981996 }
19991997 if len (store .Weights ) > 0 {
20001998 args = append (args , "weights" )
@@ -2237,12 +2235,10 @@ func (c cmdable) ZScore(ctx context.Context, key, member string) *FloatCmd {
22372235}
22382236
22392237func (c cmdable ) ZUnionStore (ctx context.Context , dest string , store * ZStore ) * IntCmd {
2240- args := make ([]interface {}, 3 + len (store .Keys ))
2241- args [0 ] = "zunionstore"
2242- args [1 ] = dest
2243- args [2 ] = len (store .Keys )
2244- for i , key := range store .Keys {
2245- args [3 + i ] = key
2238+ args := make ([]interface {}, 0 , 3 + len (store .Keys ))
2239+ args = append (args , "zunionstore" , dest , len (store .Keys ))
2240+ for _ , key := range store .Keys {
2241+ args = append (args , key )
22462242 }
22472243 if len (store .Weights ) > 0 {
22482244 args = append (args , "weights" )
0 commit comments