title: Convert URL.Query (map of slices) to struct golang
body: <p>It would be awesome to have a straight forward mapping from the standard library <a href="https://golang.org/pkg/net/url/#URL.Query" rel="noreferrer">URL.Query()</a> to an struct.</p>
  
  <p><code>Query()</code> returns a map like:
  <code>map[a:[aaaa] b:[bbbb] c:[cccc]]</code></p>
  
  <p>The struct looks like:</p>
  
  <pre><code>type Thing struct {
      A    string
      B    string
      C    string
  }
  </code></pre>
  
  <ul>
  <li>I've no idea why URL.Query returns a map with array elements inside tough. (well.. I know <a href="https://golang.org/pkg/net/url/#Values" rel="noreferrer">why</a> but a <code>GET</code> is not likely to have duplicated params)</li>
  </ul>