```go
func main() {
a := make([]int, 10)
for i := 0; i < 10; i++ {
a[i] = i + 6
}
index := array(a, 11)
fmt.Println(index)
}
func array(arr interface{}, d interface{}) int {
arrli := reflect.ValueOf(arr)
for i := 0; i < arrli.Len(); i++ {
v := arrli.Index(i)
if v.Interface() == d {
return i
}
}
return -1
}
```