title: Golang: map to struct
body: <p>For some reason (fixed-length data file parsing), I've got a map and I want the elements of the map being saved in a struct.</p>
  
  <p>Let's say:</p>
  
  <pre><code>type Point struct {X, Y int}
  point := make(map[string]int)
  
  point["X"] = 15
  point["Y"] = 13
  
  p := Point{point} // doesn't work
  </code></pre>
  
  <p>How do I do that? Or have I taken the wrong path?</p>