I want to implement a method to convert a interface{} slice to a interface{} array which has equal length to the given slice. It's similar to below:
func SliceToArray(in []interface{}) (out interface{}) {
...
}
// out's type is [...]interface{} and len(out)==len(in)
How can I implement this method?
EDIT:
Any possible to use reflect.ArrayOf to implement this?