1
0
mirror of https://github.com/redis/go-redis.git synced 2025-06-14 01:21:30 +03:00

Replace Exists with ExistsMulti.

This commit is contained in:
Vladimir Mihailenco
2017-02-18 16:32:39 +02:00
parent 56ddaf1199
commit d95ce53b0d
2 changed files with 23 additions and 31 deletions

View File

@ -49,9 +49,7 @@ type Cmdable interface {
Del(keys ...string) *IntCmd
Unlink(keys ...string) *IntCmd
Dump(key string) *StringCmd
Exists(key string) *BoolCmd
// TODO: merge with Exists in v6
ExistsMulti(keys ...string) *IntCmd
Exists(keys ...string) *IntCmd
Expire(key string, expiration time.Duration) *BoolCmd
ExpireAt(key string, tm time.Time) *BoolCmd
Keys(pattern string) *StringSliceCmd
@ -320,13 +318,7 @@ func (c *cmdable) Dump(key string) *StringCmd {
return cmd
}
func (c *cmdable) Exists(key string) *BoolCmd {
cmd := NewBoolCmd("exists", key)
c.process(cmd)
return cmd
}
func (c *cmdable) ExistsMulti(keys ...string) *IntCmd {
func (c *cmdable) Exists(keys ...string) *IntCmd {
args := make([]interface{}, 1+len(keys))
args[0] = "exists"
for i, key := range keys {