Skip to content

Commit d3bcc3e

Browse files
committed
匿名字段例子代码中fmt.Println参数修改
增加逗号,使编译通过
1 parent 140effd commit d3bcc3e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

2.4.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@ Go里面很简单的解决了这个问题,最外层的优先访问,也就是
191191

192192
func main() {
193193
Bob := Employee{Human{"Bob", 34, "777-444-XXXX"}, "Designer", "333-222"}
194-
fmt.Println("Bob's work phone is: " Bob.phone)
194+
fmt.Println("Bob's work phone is:", Bob.phone)
195195
//如果我们要访问Human的phone字段
196-
fmt.Println("Bob's personal phone is: " Bob.Human.phone)
196+
fmt.Println("Bob's personal phone is:", Bob.Human.phone)
197197
}
198198

199199

0 commit comments

Comments
 (0)