reflect.go
func InterfaceSlice(slice interface{}) []interface{} {
	v := reflect.ValueOf(slice)
	if v.Kind() != reflect.Slice {
		panic(fmt.Errorf("InterfaceSlice: not a slice but %T", slice))
	}
	result := make([]interface{}, v.Len())
	for i := range result {
		result[i] = v.Index(i).Interface()
	}
	return result
}
func InterfaceSlice(slice interface{}) []interface{} {
	v := reflect.ValueOf(slice)
	if v.Kind() != reflect.Slice {
		panic(fmt.Errorf("InterfaceSlice: not a slice but %T", slice))
	}
	result := make([]interface{}, v.Len())
	for i := range result {
		result[i] = v.Index(i).Interface()
	}
	return result
}
func InterfaceSlice ( slice interface { } ) [ ] interface { } { v := reflect . ValueOf ( slice ) if v . Kind ( ) != reflect . Slice { panic ( fmt . Errorf ( " " , slice ) ) } result := make ( [ ] interface { } , v . Len ( ) ) for i := range result { result [ i ] = v . Index ( i ) . Interface ( ) } return result }
// InterfaceSlice converts a slice of any type into a slice of interface{}.
InterfaceSlice converts a slice of any type into a slice of interface {} .