I have a function.
func doSome(v interface{}) {
}
If I pass by pointer a slice of struct into the function, the function must fill the slice.
type Color struct {
}
type Brush struct {
}
var c []Color
doSome(&c) // after с is array contains 3 elements type Color
var b []Brush
doSome(&b) // after b is array contains 3 elements type Brush
Maybe I need use reflection, but how?