title: Write struct to csv file
body: <p>What is an idiomatic golang way to dump the struct into a csv file provided? I am inside a func where my struct is passed as interface{}:</p>
  
  <pre><code>func decode_and_csv(my_response *http.Response, my_struct interface{})
  </code></pre>
  
  <p>Why interface{}? - reading data from JSON and there could be a few different structs returned, so trying to write a generic enough function.</p>
  
  <p>an example of my types:</p>
  
  <pre><code>type Location []struct {
      Name                   string `json: "Name"`
      Region                 string `json: "Region"`
      Type                   string `json: "Type"`
  }
  </code></pre>