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