mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-11-13 09:16:10 +08:00
05.0.md
This commit is contained in:
@@ -1,23 +1,8 @@
|
||||
##啊哦,亲,你看得也太快了。。。还没翻译完呢 0 0
|
||||
要不等到 ***2013 年 6 月 20 日*** 再来看看吧~~
|
||||
|
||||
这里还有一些其它的学习资源噢~
|
||||
|
||||
- [《Go编程基础》](https://github.com/Unknwon/go-fundamental-programming):已更新至 [第12课](https://github.com/Unknwon/go-fundamental-programming/blob/master/lectures/lecture12.md)
|
||||
- [《Go Web编程》](https://github.com/astaxie/build-web-application-with-golang)
|
||||
|
||||
神马?你说你不想学习?那好吧,去逛逛看看行情也行~
|
||||
|
||||
- [Go Walker](http://gowalker.org) **Go 项目文档在线浏览工具**
|
||||
- [Golang中文社区](http://bbs.mygolang.com/forum.php)
|
||||
- [Go语言学习园地](http://studygolang.com/)
|
||||
- [Golang中国](http://golang.tc)
|
||||
|
||||
#5.0 控制结构
|
||||
到目前为止,我们看到的都是 Go 程序都是从 main() 函数开始执行,然后按顺序执行该函数体中的代码。但我们经常会需要只有在满足一些特定情况时才执行某些代码,也就是说在代码里进行条件判断。针对这种需求,Go 提供了下面这些条件结构和分支结构:
|
||||
|
||||
if-else 结构
|
||||
switch-else 结构
|
||||
switch 结构
|
||||
select 结构,用于 channel 的选择(第 14.4 节)
|
||||
|
||||
可以使用迭代或循环结构来重复执行一次或多次某段代码(任务):
|
||||
|
||||
Reference in New Issue
Block a user