title: How to unmarshal embedded structs from yaml
body: <p>I would like to unmarshal yaml using embedded structs mostly for DRY:</p>
  
  <pre><code>package main
  
  import (
      "fmt"
      "log"
      "gopkg.in/yaml.v2"
  )
  
  type Person struct {
      Name string
  }
  
  type Employee struct {
      Person
      Number string
  }
  
  func (c *Employee) Dump() {
      d, err := yaml.Marshal(c)
      if err != nil {
          log.Fatalf("error: %v", err)
      }
      fmt.Printf("--- dump:\n%s\n\n", string(d))
  }
  
  func main() {
      s := `
  name: john
  number: one
  `
  
      c := &amp;Employee{}
      err := yaml.Unmarshal([]byte(s), c)
      if err != nil {
          log.Fatalf("Unmarshal: %v", err)
      }
  
      c.Dump()
  }
  </code></pre>
  
  <p>This results in:</p>
  
  <pre><code>--- dump:
  person:
    name: ""
  number: one
  </code></pre>
  
  <p>How can the embedded Person be unmarshaled?</p>