修改了第二章的目录

interface是method的集合,先介绍method
This commit is contained in:
xiemengjun
2012-08-30 22:51:15 +08:00
parent a3a223ddcf
commit 6bd75c7ae3
6 changed files with 30 additions and 18 deletions

2
2.3.md
View File

@@ -451,7 +451,7 @@ Go程序里面会自动调用init()和main(),所以你不需要在任何地方
## links ## links
* [目录](<preface.md>) * [目录](<preface.md>)
* 上一章: [GO基础](<2.2.md>) * 上一章: [GO基础](<2.2.md>)
* 下一节: [高级类型](<2.4.md>) * 下一节: [struct类型](<2.4.md>)
## LastModified ## LastModified
* $Id$ * $Id$

8
2.4.md
View File

@@ -1,4 +1,4 @@
#2.4 高级类型 #2.4 struct类型
##struct ##struct
Go语言中也和C或者其他语言一样我们可以声明新的类型作为其它类型的属性或字段的容器。例如我们可以创建一个自定义类型`person`代表一个人的实体。这个实体拥有属性:姓名和年龄。这样的类型我们称之`struct`。如下代码所示: Go语言中也和C或者其他语言一样我们可以声明新的类型作为其它类型的属性或字段的容器。例如我们可以创建一个自定义类型`person`代表一个人的实体。这个实体拥有属性:姓名和年龄。这样的类型我们称之`struct`。如下代码所示:
@@ -196,12 +196,6 @@ Go里面很简单的解决了这个问题最外层的优先访问也就是
fmt.Println("Bob's personal phone is: " Bob.Human.phone) fmt.Println("Bob's personal phone is: " Bob.Human.phone)
} }
##interface
###什么是interface
###interface类型
###interface值
###interface函数参数
## links ## links
* [目录](<preface.md>) * [目录](<preface.md>)

9
2.5.md Normal file
View File

@@ -0,0 +1,9 @@
#2.5面向对象
## links
* [目录](<preface.md>)
* 上一章: [struct类型](<2.4.md>)
* 下一节: [interface](<2.6.md>)
## LastModified
* $Id$

7
2.6.md Normal file
View File

@@ -0,0 +1,7 @@
#2.6interface
##interface
###什么是interface
###interface类型
###interface值
###interface函数参数

11
2.md
View File

@@ -4,11 +4,12 @@
* 1. [你好GO](2.1.md) * 1. [你好GO](2.1.md)
* 2. [GO基础](2.2.md) * 2. [GO基础](2.2.md)
* 3. [流程和函数](2.3.md) * 3. [流程和函数](2.3.md)
* 4. [高级类型](2.4.md) * 4. [struct类型](2.4.md)
* 5. [面向对象](2.5.md) * 5. [面向对象](2.5.md)
* 6. [并发](2.6.md) * 6. [interface](2.6.md)
* 7. [通讯](2.7.md) * 7. [并发](2.7.md)
* 8. [小结](2.8.md) * 8. [通讯](2.8.md)
* 9. [小结](2.9.md)
GO是一门类似C的编译性语言但是他的编译速度非常快这门语言的关键字加起来也就二十五个比英文字母的二十六还少一个这对于我们来说学习就变得简单了很多先让我们看一眼这些关键字都长成怎么样 GO是一门类似C的编译性语言但是他的编译速度非常快这门语言的关键字加起来也就二十五个比英文字母的二十六还少一个这对于我们来说学习就变得简单了很多先让我们看一眼这些关键字都长成怎么样

View File

@@ -8,11 +8,12 @@
- 2.1. [你好GO](2.1.md) - 2.1. [你好GO](2.1.md)
- 2.2. [GO基础](2.2.md) - 2.2. [GO基础](2.2.md)
- 2.3. [流程和函数](2.3.md) - 2.3. [流程和函数](2.3.md)
- 2.4. [高级类型](2.4.md) - 2.4. [struct](2.4.md)
- 2.5. [面向对象](2.5.md) - 2.5. [面向对象](2.5.md)
- 2.6. [并发](2.6.md) - 2.6. [interface](2.6.md)
- 2.7. [通讯](2.7.md) - 2.7. [并发](2.7.md)
- 2.8. [小结](2.8.md) - 2.8. [通讯](2.8.md)
- 2.9. [小结](2.9.md)
* 3.[设计开发博客系统](3.md) * 3.[设计开发博客系统](3.md)
* 4.如何实现路由 * 4.如何实现路由
* 5.web语言处理 * 5.web语言处理