1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-28 06:42:00 +03:00

Add SMembersMap function

This commit is contained in:
Crimson
2017-11-19 17:36:23 +01:00
parent d0f86971b5
commit 7aa0130b2e
4 changed files with 70 additions and 0 deletions

View File

@ -143,6 +143,7 @@ type Cmdable interface {
SInterStore(destination string, keys ...string) *IntCmd
SIsMember(key string, member interface{}) *BoolCmd
SMembers(key string) *StringSliceCmd
SMembersMap(key string) *StringStructMapCmd
SMove(source, destination string, member interface{}) *BoolCmd
SPop(key string) *StringCmd
SPopN(key string, count int64) *StringSliceCmd
@ -1169,6 +1170,12 @@ func (c *cmdable) SMembers(key string) *StringSliceCmd {
return cmd
}
func (c *cmdable) SMembersMap(key string) *StringStructMapCmd {
cmd := NewStringStructMapCmd("smembers", key)
c.process(cmd)
return cmd
}
func (c *cmdable) SMove(source, destination string, member interface{}) *BoolCmd {
cmd := NewBoolCmd("smove", source, destination, member)
c.process(cmd)