Skip to content

Commit d97b5c2

Browse files
committed
Merge pull request astaxie#21 from wisape/patch-1
匿名字段例子代码中fmt.Println参数修改
2 parents 140effd + d3bcc3e commit d97b5c2

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)