mirror of https://github.com/go-redis/redis.git
Change getInterleavedArguments function
This commit is contained in:
parent
be805cbe10
commit
a5fdfa2ec8
|
@ -210,9 +210,9 @@ func (cmd *baseCmd) readRawReply(rd *proto.Reader) (err error) {
|
|||
return err
|
||||
}
|
||||
|
||||
// getInterleavedArguments returns arguments at even indices starting from index 0.
|
||||
// getInterleavedArguments returns arguments at even indices starting from index 1.
|
||||
func (cmd *baseCmd) getInterleavedArguments() []string {
|
||||
return cmd.getInterleavedArgumentsWithOffset(0)
|
||||
return cmd.getInterleavedArgumentsWithOffset(1)
|
||||
}
|
||||
|
||||
// getInterleavedArgumentsWithOffset returns arguments at even indices starting from the specified offset.
|
||||
|
|
|
@ -151,7 +151,7 @@ func (c cmdable) MSet(ctx context.Context, values ...interface{}) *StatusCmd {
|
|||
args[0] = "mset"
|
||||
args = appendArgs(args, values)
|
||||
cmd := NewStatusCmd(ctx, args...)
|
||||
cmd.keys = append(cmd.keys, cmd.getInterleavedArgumentsWithOffset(1)...)
|
||||
cmd.keys = append(cmd.keys, cmd.getInterleavedArguments()...)
|
||||
_ = c(ctx, cmd)
|
||||
return cmd
|
||||
}
|
||||
|
@ -166,7 +166,7 @@ func (c cmdable) MSetNX(ctx context.Context, values ...interface{}) *BoolCmd {
|
|||
args[0] = "msetnx"
|
||||
args = appendArgs(args, values)
|
||||
cmd := NewBoolCmd(ctx, args...)
|
||||
cmd.keys = append(cmd.keys, cmd.getInterleavedArgumentsWithOffset(1)...)
|
||||
cmd.keys = append(cmd.keys, cmd.getInterleavedArguments()...)
|
||||
_ = c(ctx, cmd)
|
||||
return cmd
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue