How to create a slice of variable type in Go?
<p>I have a function.</p>

<pre><code>func doSome(v interface{}) {

}  
</code></pre>

<p>If I pass by pointer a slice of struct into the function, the function must fill the slice.</p>

<pre><code>type Color struct {
}
type Brush struct {
}

var c []Color
doSome(&amp;c) // after с is array contains 3 elements type Color

var b []Brush
doSome(&amp;b) // after b is array contains 3 elements type Brush
</code></pre>

<p>Maybe I need use reflection, but how?</p>