mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 03:34:15 +08:00
@@ -93,8 +93,8 @@ func main() {
|
||||
|
||||
// NOT OK
|
||||
z := make(Bar) // 编译错误:cannot make type Bar
|
||||
(*y).thingOne = "hello"
|
||||
(*y).thingTwo = 1
|
||||
(*z).thingOne = "hello"
|
||||
(*z).thingTwo = 1
|
||||
|
||||
// OK
|
||||
x := make(Foo)
|
||||
|
Reference in New Issue
Block a user