匿名字段例子代码中fmt.Println参数修改

增加逗号,使编译通过
This commit is contained in:
wisape
2012-09-16 08:09:12 +08:00
parent 140effddb5
commit d3bcc3ef3d

4
2.4.md
View File

@@ -191,9 +191,9 @@ Go里面很简单的解决了这个问题最外层的优先访问也就是
func main() {
Bob := Employee{Human{"Bob", 34, "777-444-XXXX"}, "Designer", "333-222"}
fmt.Println("Bob's work phone is: " Bob.phone)
fmt.Println("Bob's work phone is:", Bob.phone)
//如果我们要访问Human的phone字段
fmt.Println("Bob's personal phone is: " Bob.Human.phone)
fmt.Println("Bob's personal phone is:", Bob.Human.phone)
}