增加图注释

This commit is contained in:
xiemengjun
2013-01-16 23:11:49 +08:00
parent 133d9976b3
commit e54f54988d
27 changed files with 152 additions and 10 deletions

View File

@@ -126,6 +126,8 @@ Go语言中也和C或者其他语言一样我们可以声明新的类型
![](images/2.4.student_struct.png?raw=true)
图2.7 Student和Human的方法继承
我们看到Student访问属性age和name的时候就像访问自己所有用的字段一样匿名字段就是这样能够实现字段的继承。是不是很酷啊还有比这个更酷的呢那就是student还能访问Human这个字段作为字段名。请看下面的代码是不是更酷了。
mark.Human = Human{"Marcus", 55, 220}