1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-29 17:41:15 +03:00

Fix HMSet to accept interface{} value.

This commit is contained in:
Vladimir Mihailenco
2017-02-18 15:42:12 +02:00
parent 135cb12c76
commit 56ddaf1199
2 changed files with 3 additions and 3 deletions

View File

@ -111,7 +111,7 @@ type Cmdable interface {
HKeys(key string) *StringSliceCmd
HLen(key string) *IntCmd
HMGet(key string, fields ...string) *SliceCmd
HMSet(key string, fields map[string]string) *StatusCmd
HMSet(key string, fields map[string]interface{}) *StatusCmd
HSet(key, field string, value interface{}) *BoolCmd
HSetNX(key, field string, value interface{}) *BoolCmd
HVals(key string) *StringSliceCmd
@ -880,7 +880,7 @@ func (c *cmdable) HMGet(key string, fields ...string) *SliceCmd {
return cmd
}
func (c *cmdable) HMSet(key string, fields map[string]string) *StatusCmd {
func (c *cmdable) HMSet(key string, fields map[string]interface{}) *StatusCmd {
args := make([]interface{}, 2+len(fields)*2)
args[0] = "hmset"
args[1] = key