in golang/service/service.go [471:482]
func AssertAsArray(a interface{}) (_result []interface{}, _err error) {
r := reflect.ValueOf(a)
if r.Kind().String() != "array" && r.Kind().String() != "slice" {
return nil, errors.New(fmt.Sprintf("%v is not a []interface{}", a))
}
aLen := r.Len()
res := make([]interface{}, 0)
for i := 0; i < aLen; i++ {
res = append(res, r.Index(i).Interface())
}
return res, nil
}