title: map of map of structs and "assignment to entry in nil map"
body: <p>Here's an example where I get <code>assignment to entry in nil map</code> every time:
  <a href="https://play.golang.org/p/LudJs0rVbs" rel="nofollow">https://play.golang.org/p/LudJs0rVbs</a></p>
  
  <p>To demonstrate what I'm trying to do, here's a naive version that causes 2 lookups to the database (you'll have to use your imagination on line 11):
  <a href="https://play.golang.org/p/YZNFeMHyMs" rel="nofollow">https://play.golang.org/p/YZNFeMHyMs</a></p>
  
  <p>Basically, I'm trying to do this:</p>
  
  <pre><code>things := make(map[string]map[string][]Struct)
  ...
  stuff, there := things["first key"]
  if !there {
      things["first key"] = getAMapOfStringToStructs()
  }
  doSomethingWith(things["first key"])
  </code></pre>
  
  <p>I've looked at the more <a href="https://blog.golang.org/go-maps-in-action" rel="nofollow">trivial examples of maps-of-maps here</a> but I can't seem to map that to my problem.  </p>