Rewrited the last segment in 2.3; modified some sentence.

This commit is contained in:
Oling Cat
2012-09-26 18:09:42 +08:00
parent c2a1c55de4
commit 2dde07d0aa
4 changed files with 53 additions and 56 deletions

14
2.8.md
View File

@@ -1,7 +1,7 @@
#2.8总结
这一章我们主要介绍了Go语言的一些语法通过语法我们可以发现Go是多么的简单只有二十五个关键字。让我们再来回顾一下这些关键字都是用来干什么的。
break default func interface select
case defer go map struct
chan else goto package switch
@@ -12,15 +12,15 @@
- package和import已经有过短暂的接触
- func 用于定义函数和方法
- return 用于从函数返回
- defer用于类似析构函数
- defer 用于类似析构函数
- go 用于并行
- select 用于选择不同类型的通讯
- interface用于定义接口参考2.6小节
- interface 用于定义接口参考2.6小节
- struct 用于定义抽象数据类型参考2.5小节
- break、case、continue、for、fallthrough、else、if、switch、goto、default这些参考2.3流程介绍里面
- chan用于channel通讯
- type用于什么自定义类
- map用于什么map类型数据
- type用于声明自定义类
- map用于声明map类型数据
- range用于读取slice、map、channel数据
上面这二十五个关键字记住了那么Go你也已经差不多学会了。
@@ -30,5 +30,5 @@
* 上一节: [并发](<2.7.md>)
* 下一章: [Web基础](<3.md>)
## LastModified
* $Id$
## LastModified
* $Id$