title: golang type conversion. interface to struct
body: <p>I am not used to <code>golang</code>. </p>
  
  <p>When I requested, I got the below log.</p>
  
  <p>I would like to parse the log and store into <code>struct</code> type.</p>
  
  <p>Someone lets me know how to do?</p>
  
  <p>Thanks in advance.</p>
  
  <h2>for example :</h2>
  
  <pre><code>type ResultStruct struct{
      id int
      guid string
      name string
  }
  
  for k, v := range data {
      fmt.Print(v.id) fmt.Print(v.guid) fmt.Print(v.name)
  }
  </code></pre>
  
  <p><strong>[log]</strong></p>
  
  <blockquote>
    <p>data: [map[id:90001 guid:a name:test1] map[guid:b name:test2 id:90002] map[name:test3 id:90003 guid:c]]</p>
  </blockquote>
  
  <p><b>[source]</b></p>
  
  <pre><code>response := httpClient.Do(request)
  var data interface{}
  rawdata, err := ioutil.ReadAll(response.body)
  json.Unmarshal(rawdata, &amp;data)
  fmt.Println("data :", data)
  </code></pre>