forked from mirror/redis
remove mandatory arg value in lpushx and rpushx
This commit is contained in:
parent
5c3de7537a
commit
87ea8a4220
14
commands.go
14
commands.go
|
@ -140,7 +140,7 @@ type Cmdable interface {
|
||||||
LLen(key string) *IntCmd
|
LLen(key string) *IntCmd
|
||||||
LPop(key string) *StringCmd
|
LPop(key string) *StringCmd
|
||||||
LPush(key string, values ...interface{}) *IntCmd
|
LPush(key string, values ...interface{}) *IntCmd
|
||||||
LPushX(key string, value interface{}, values ...interface{}) *IntCmd
|
LPushX(key string, values ...interface{}) *IntCmd
|
||||||
LRange(key string, start, stop int64) *StringSliceCmd
|
LRange(key string, start, stop int64) *StringSliceCmd
|
||||||
LRem(key string, count int64, value interface{}) *IntCmd
|
LRem(key string, count int64, value interface{}) *IntCmd
|
||||||
LSet(key string, index int64, value interface{}) *StatusCmd
|
LSet(key string, index int64, value interface{}) *StatusCmd
|
||||||
|
@ -148,7 +148,7 @@ type Cmdable interface {
|
||||||
RPop(key string) *StringCmd
|
RPop(key string) *StringCmd
|
||||||
RPopLPush(source, destination string) *StringCmd
|
RPopLPush(source, destination string) *StringCmd
|
||||||
RPush(key string, values ...interface{}) *IntCmd
|
RPush(key string, values ...interface{}) *IntCmd
|
||||||
RPushX(key string, value interface{}, values ...interface{}) *IntCmd
|
RPushX(key string, values ...interface{}) *IntCmd
|
||||||
SAdd(key string, members ...interface{}) *IntCmd
|
SAdd(key string, members ...interface{}) *IntCmd
|
||||||
SCard(key string) *IntCmd
|
SCard(key string) *IntCmd
|
||||||
SDiff(keys ...string) *StringSliceCmd
|
SDiff(keys ...string) *StringSliceCmd
|
||||||
|
@ -1087,11 +1087,10 @@ func (c cmdable) LPush(key string, values ...interface{}) *IntCmd {
|
||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c cmdable) LPushX(key string, value interface{}, values ...interface{}) *IntCmd {
|
func (c cmdable) LPushX(key string, values ...interface{}) *IntCmd {
|
||||||
args := make([]interface{}, 3, 3+len(values))
|
args := make([]interface{}, 2, 2+len(values))
|
||||||
args[0] = "lpushx"
|
args[0] = "lpushx"
|
||||||
args[1] = key
|
args[1] = key
|
||||||
args[2] = value
|
|
||||||
args = appendArgs(args, values)
|
args = appendArgs(args, values)
|
||||||
cmd := NewIntCmd(args...)
|
cmd := NewIntCmd(args...)
|
||||||
c(cmd)
|
c(cmd)
|
||||||
|
@ -1154,11 +1153,10 @@ func (c cmdable) RPush(key string, values ...interface{}) *IntCmd {
|
||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c cmdable) RPushX(key string, value interface{}, values ...interface{}) *IntCmd {
|
func (c cmdable) RPushX(key string, values ...interface{}) *IntCmd {
|
||||||
args := make([]interface{}, 3, 3+len(values))
|
args := make([]interface{}, 2, 2+len(values))
|
||||||
args[0] = "rpushx"
|
args[0] = "rpushx"
|
||||||
args[1] = key
|
args[1] = key
|
||||||
args[2] = value
|
|
||||||
args = appendArgs(args, values)
|
args = appendArgs(args, values)
|
||||||
cmd := NewIntCmd(args...)
|
cmd := NewIntCmd(args...)
|
||||||
c(cmd)
|
c(cmd)
|
||||||
|
|
Loading…
Reference in New Issue