diff --git a/commands.go b/commands.go index bc93df9..21d5aa9 100644 --- a/commands.go +++ b/commands.go @@ -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 diff --git a/commands_test.go b/commands_test.go index a524aaf..2619186 100644 --- a/commands_test.go +++ b/commands_test.go @@ -1223,7 +1223,7 @@ var _ = Describe("Commands", func() { }) It("should HMSet", func() { - ok, err := client.HMSet("hash", map[string]string{ + ok, err := client.HMSet("hash", map[string]interface{}{ "key1": "hello1", "key2": "hello2", }).Result()