title: How to convert a struct to a different struct with fewer fields
body: <p>I am trying to copy a struct of type Big to type Small without explicitly creating a new struct of type Small with the same fields.</p>
  
  <p>I have tried searching for other similar problems such as <a href="https://stackoverflow.com/questions/37246473/copy-one-struct-to-another-where-structs-have-same-members-and-different-types">this</a> and <a href="https://stackoverflow.com/questions/24613271/golang-is-conversion-between-different-struct-types-possible">this</a> yet all the conversions between different struct types happen only if the structs have the same fields.</p>
  
  <p>Here is an example of what I tried to do:</p>
  
  <pre class="lang-golang prettyprint-override"><code>// Big has all the fields that Small has including some new ones.
  type Big struct {
      A int
      B string
      C float
      D byte
  }
  
  type Small struct {
      A int
      B string
  }
  
  // This is the current solution which I hope to not use.
  func ConvertFromBigToSmall(big Big) Small {
      return Small{
          A: big.A,
          B: big.B,
      }
  }
  </code></pre>
  
  <p>I expected to be able to do something like this, yet it does not work:</p>
  
  <pre class="lang-golang prettyprint-override"><code>big := Big{}
  small := Small(big)
  </code></pre>
  
  <p>Is there a way of converting between <code>Big</code> to <code>Small</code> (and maybe even vice-versa) without using a <code>Convert</code> function?</p>