Initialize array of interfaces in Golang

go

Solution

strs := []string{"first", "second"}
names := make([]interface{}, len(strs))
for i, s := range strs {
    names[i] = s
}

Would be the simplest

Problem

Here is an example of variable: `names := []interface{}{"first", "second"}` How can it be initialized dynamically, from an array of strings?

Original source