title: downcast higher-type to lower
body: <p>Is there beside copying the inner <code>Box</code> value by hand a language feature to down-cast <code>RatedBox</code> into a <code>Box</code>?</p>
  
  <pre><code>type Box struct {
      Name string
  }
  
  type RatedBox struct {
      Box
      Points int
  }
  
  func main() {
      rated := RatedBox{Box: Box{Name: "foo"}, Points: 10}
  
      box := Box(rated) // does not work
  }
  </code></pre>
  
  <p><a href="https://play.golang.org/p/iNpPgiIWqv" rel="nofollow noreferrer">go-playground</a></p>
  
  <pre><code>// works, but is quite verbose for structs with more members
  box := Box{Name: rated.Name}
  </code></pre>