@@ -1,6 +1,7 @@
# 18.2 数组和切片
创建:
+
`arr1 := new([len]type)`
`slice1 := make([]type, len)`
@@ -12,7 +12,7 @@ for key, value := range map1 {
}
```
-(2)如何在一个映射中检测键key1是否存在:
+(2)如何在一个映射中检测键`key1`是否存在:
`val1, isPresent = map1[key1]`
@@ -10,7 +10,7 @@ type struct1 struct {
ms := new(struct1)
-初始化:
+初始化:
```go
ms := &struct1{10, 15.5, "Chris"}
@@ -151,17 +151,6 @@
- 第16章:常见的陷阱与错误
- 第17章:模式
- 第18章:[出于性能考虑的实用代码片段](18.0.md)
- -18.1
- -18.2
- -18.3
- -18.4
- -18.5
- -18.6
- -18.7
- -18.8
- -18.9
- -18.10
- -18.11
- 第19章:构建一个完整的应用程序
- 第20章:Go 语言在 Google App Engine 的使用
- 第21章:实际部署案例