拼写错误, YonggChap -> YongChap, 与示例代码保持一致

This commit is contained in:
wuwj-cn
2013-04-14 20:36:11 +08:00
parent b27ae08051
commit 6e6f9aacfe

View File

@@ -83,7 +83,7 @@ interface类型定义了一组方法如果某个对象实现了某个接口
SpendSalary(amount float32)
}
通过上面的代码我们可以知道interface可以被任意的对象实现。我们看到上面的Men interface被Human、Student和Employee实现。同理一个对象可以实现任意多个interface例如上面的Student实现了Men和YonggChap两个interface。
通过上面的代码我们可以知道interface可以被任意的对象实现。我们看到上面的Men interface被Human、Student和Employee实现。同理一个对象可以实现任意多个interface例如上面的Student实现了Men和YongChap两个interface。
最后任意的类型都实现了空interface(我们这样定义interface{})也就是包含0个method的interface。