title: Go YAML unmarshal doesn't decode all the object structure to a generic interface. Any ideas why?
body: <p>Why wouldn't the following <code>Go</code> program work? The map is empty after the Unmarshal. Is there any changes that I could do to deserialize this correctly? Or should I end up using <code>yaml.Node</code>?</p>
  
  <pre class="lang-golang prettyprint-override"><code>package main
  
  import (
      "fmt"
      "gopkg.in/yaml.v3"
  )
  
  func main() {
      empYaml := `
        employees:
          - id: 11
            name: Irshad
            department: IT
            designation: Product Manager
            address:
              city: Mumba
              state: Maharashtra
              country: India
      `
  
      var result map[string]interface{}
      yaml.Unmarshal([]byte(empYaml), &amp;result)
  
      fmt.Println(result)
  }
  </code></pre>
  
  <p>Play URL: <a href="https://play.golang.org/p/tG44j15mNjH" rel="nofollow noreferrer">https://play.golang.org/p/tG44j15mNjH</a></p>