mirror of
https://github.com/gopl-zh/gopl-zh.github.com.git
synced 2025-08-17 03:42:14 +00:00
ch4: fix code path
This commit is contained in:
@@ -87,9 +87,8 @@ w = Wheel{X: 8, Y: 8, Radius: 5, Spokes: 20} // compile error: unknown fields
|
||||
|
||||
結構體字面值必須遵循形狀類型聲明時的結構,所以我們隻能用下面的兩種語法,它們彼此是等價的:
|
||||
|
||||
<u><i>gopl.io/ch4/embed</i></u>
|
||||
```Go
|
||||
gopl.io/ch4/embed
|
||||
|
||||
w = Wheel{Circle{Point{8, 8}, 5}, 20}
|
||||
|
||||
w = Wheel{
|
||||
|
Reference in New Issue
Block a user