第4章,部分字词修订。

This commit is contained in:
zhliner
2017-08-24 22:27:15 +08:00
parent 725acf091c
commit 9c0723ff6a
9 changed files with 19 additions and 19 deletions

View File

@@ -105,7 +105,7 @@ x = append(x, x...) // append the slice x
fmt.Println(x) // "[1 2 3 4 5 6 1 2 3 4 5 6]"
```
通过下面的小修改,我们可以可以达到append函数类似的功能。其中在appendInt函数参数中的最后的“...”省略号表示接收变长的参数为slice。我们将在5.7节详细解释这个特性。
通过下面的小修改我们可以达到append函数类似的功能。其中在appendInt函数参数中的最后的“...”省略号表示接收变长的参数为slice。我们将在5.7节详细解释这个特性。
```Go
func appendInt(x []int, y ...int) []int {