|
@@ -1,4 +1,4 @@
|
|
|
-# 11.9 空接口
|
|
|
|
|
|
|
+# 11.9 空接口
|
|
|
|
|
|
|
|
## 11.9.1 概念
|
|
## 11.9.1 概念
|
|
|
|
|
|
|
@@ -164,7 +164,7 @@ var interfaceSlice []interface{} = dataSlice
|
|
|
var dataSlice []myType = FuncReturnSlice()
|
|
var dataSlice []myType = FuncReturnSlice()
|
|
|
var interfaceSlice []interface{} = make([]interface{}, len(dataSlice))
|
|
var interfaceSlice []interface{} = make([]interface{}, len(dataSlice))
|
|
|
for ix, d := range dataSlice {
|
|
for ix, d := range dataSlice {
|
|
|
- interfaceSlice[i] = d
|
|
|
|
|
|
|
+ interfaceSlice[ix] = d
|
|
|
}
|
|
}
|
|
|
```
|
|
```
|
|
|
|
|
|