title: the relation between add key/value and mapassign method in go1.10.3
body: <p>I am reading the source code of map in <a href="https://github.com/golang/go/blob/master/src/runtime/map.go" rel="nofollow noreferrer">go1.10.3</a>.It seemed there exist corresponding method about operation such as:</p>
  
  <pre><code> makemap(t *maptype, hint int, h *hmap) *hmap ==&gt; m = make(map[xx]yy)
   mapaccess1(t *maptype, h *hmap, key unsafe.Pointer)==&gt; m['key']
  </code></pre>
  
  <p>but I cant find the correspond method for the operation which add key/value as below:</p>
  
  <pre><code> m['xx']='yy'
  </code></pre>
  
  <p>there exist a method called mapassign which has some similarity with this 
  operation.</p>
  
  <pre><code> mapassign(t *maptype, h *hmap, key unsafe.Pointer) unsafe.Pointer
  </code></pre>
  
  <p>this will add a new key to the map, but as we can see, <strong>the input arguments has no value</strong>. And another question is when it has already this key, it maybe update this key.</p>
  
  <pre><code>        if !alg.equal(key, k) {
              continue
          }
          // already have a mapping for key. Update it.
          if t.needkeyupdate {//why??
              typedmemmove(t.key, k, key)
          }
  </code></pre>
  
  <p>since the two key is equal, why should update it?</p>
  
  <p><strong>summary:</strong> <br>
  1. the relation between add key/value operation and method <em>mapassign</em>?<br>
  2. why it maybe need to update the key since the insert key and the key which has already exist is equal in mapassign method?</p>