title: Go-Redis HMSet with string fields gives WRONGTYPE Operation
body: <p>I'm trying to use <a href="https://redis.io/commands/hmset" rel="nofollow noreferrer">HMSET</a> to set a new <code>hash</code> containing two string fields, <code>id</code> and <code>content</code>.</p>
  
  <p>I'm able to make this via <code>redis-cli</code> pretty easily using <code>SET i 0</code> to initialize a counter for ids, then creating a new hash using <code>HMSET test id hey content herro</code> and getting both of these fields with <code>HMGET test id content</code> resulting in <code>1) hey 2) herro</code>.</p>
  
  <p>Unfortunately I'm not able to achieve such result with <a href="https://godoc.org/github.com/go-redis/redis" rel="nofollow noreferrer">Go-Redis</a> and in particular with <a href="https://godoc.org/github.com/go-redis/redis#Client.HMSet" rel="nofollow noreferrer">HMSet</a>.</p>
  
  <p>So far I tried</p>
  
  <pre><code>var uid = "0"
  err = c.Get("i").Err()
  if(err != nil) {
      //If the counter is not set, set it to 0
      err := c.Set("i", "0", 0).Err()
      if(err != nil){
          panic(err)
      }
  } else {
      //Else, increment it
      counter, err := c.Incr("i").Result()
      //Cast it to string
      uid = strconv.FormatInt(index, 10)
      if(err != nil){
          panic(err)
      }
      //Set new counter
      err = c.Set("i", counter, 0).Err()
      if( err!= nil ){
          panic(err)
      }
  }
  
  //Init a map[string]interface{}
  var m = make(map[string]interface{})
  m["id"] = uid
  m["content"] = "herro"
  
  hash, err := c.HMSet("i", m).Result()
  if(err != nil){
      panic(err)
  }
  
  fmt.Println(hash)
  </code></pre>
  
  <p>Everything works fine but <code>c.HMSet("i", m).Result()</code>. I get:</p>
  
  <blockquote>
    <p>WRONGTYPE Operation against a key holding the wrong kind of value</p>
  </blockquote>
  
  <p>And I cannot really get why since I managed to make it work on the very same way in <code>redis-cli</code>.</p>
  
  <p><code>HMSet</code> is defined as <code>func (c *Client) HMSet(key string, fields map[string]interface{}) *StatusCmd</code>.</p>
  
  <p>I wasn't able to find any example online using Go-Redis illustrating this use case.</p>
  
  <p><strong>What Am I doing Wrong?</strong></p>