mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-11 19:41:43 +08:00
chapter5: fix typos.
This commit is contained in:
@@ -64,13 +64,14 @@ func main() {
|
|||||||
|
|
||||||
```
|
```
|
||||||
0 1 2 3 4 6 7 8 9
|
0 1 2 3 4 6 7 8 9
|
||||||
5 is skipped
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
5被跳过了。
|
||||||
|
|
||||||
关键字 continue 只能被用于 for 循环中。
|
关键字 continue 只能被用于 for 循环中。
|
||||||
|
|
||||||
## 链接
|
## 链接
|
||||||
|
|
||||||
- [目录](directory.md)
|
- [目录](directory.md)
|
||||||
- 上一节:[for 结构](05.4.md)
|
- 上一节:[for 结构](05.4.md)
|
||||||
- 下一节:[标签与 goto](05.6.md)
|
- 下一节:[标签与 goto](05.6.md)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
# 5.6 标签与 goto
|
# 5.6 标签与 goto
|
||||||
|
|
||||||
for、switch 或 select 语句都可以配合标签(label)形式的标识符使用,即某一行行第一个以分号结尾的单词(gofmt 会将后续代码自动移至下一行)。
|
for、switch 或 select 语句都可以配合标签(label)形式的标识符使用,即某一行第一个以冒号(":")结尾的单词(gofmt 会将后续代码自动移至下一行)。
|
||||||
|
|
||||||
Listing 5.13 [for6.go](examples/chapter_5/for6.go):
|
Listing 5.13 [for6.go](examples/chapter_5/for6.go):
|
||||||
|
|
||||||
@@ -97,7 +97,7 @@ fmt.Println(“A statement just after for loop.”)
|
|||||||
```
|
```
|
||||||
for i := 0; i<7 ; i++ {
|
for i := 0; i<7 ; i++ {
|
||||||
if i%2 == 0 { continue }
|
if i%2 == 0 { continue }
|
||||||
fmt.Println(“Odd:”, i)
|
fmt.Println(“Odd:”, i)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user