title: golang when iterate map, how to get key as pointer?
body: <p>Currently I am storing a map with key being a Struct (MyIntC). I would like to retrieve all the key in the map as a slice. The slice will be pointer to map key. This is so there is no copy of multiple key.</p>
  
  <p>When I tried in here (<a href="https://play.golang.org/p/bclmCh_YV5" rel="nofollow noreferrer">https://play.golang.org/p/bclmCh_YV5</a>), it is not working.</p>
  
  <p>All elements in the slice will point to the last map key element iterated.</p>
  
  <p>Why is that so? How could I overcome this?</p>
  
  <p>Note: I suspect it is very similar issue to <a href="https://stackoverflow.com/questions/45468089/slice-of-structs-vs-a-slice-of-pointers-to-structs">Slice of structs vs a slice of pointers to structs</a>, in which I am always using the local variable address.</p>
  
  <p>Thanks.</p>