How to create struct which is composed of another : <p>I have a struct like so:</p>

<pre><code>type Docs struct {
    Methods []string
    Route string
}
</code></pre>

<p>and then I import that from another file like:</p>

<pre><code>import tc "huru/type-creator"
</code></pre>

<p>and use it like so:</p>

<pre><code>type DocsLocal struct {
    tc.Docs
}
</code></pre>

<p>I am pretty certain that tc.Docs is just a field in DocsLocal, so this would be a case of composition, right?</p>

<p>if I want to create new instance of DocsLocal, I try this:</p>

<pre><code>d:= DocsLocal{}
</code></pre>

<p>but how do I pass in the Methods and Route parameters? If I do this:</p>

<pre><code>methods:= []string{"foo"}
r:="biscuit"
d:= DocsLocal{methods, r}
</code></pre>

<p>I get an error:</p>

<blockquote>
  <p>Cannot use methods (type []string) as type tc.Docs more</p>
</blockquote>

<p>So what is the right syntax to use here?</p>
