title: convert YYYYMMDD string to a valid date in Go
body: <p>I want to convert a string <code>"20101011"</code> to a valid date (<code>2010-10-11</code>), but could not figure our how to do it.  </p>
  
  <p>I tried:</p>
  
  <pre><code>now := time.Now()
  date := now.Format("20101011")
  </code></pre>
  
  <p>and</p>
  
  <pre><code>date, _ := time.Parse("20101011", "20101011")
  </code></pre>
  
  <p>neither one worked. </p>