Make more accurate description

This commit is contained in:
Andrew-liu
2016-04-12 23:52:34 +08:00
parent 57b8043440
commit c78964131f
2 changed files with 2 additions and 2 deletions

View File

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