嵌入的對象,裡面的變數有個專有名詞,叫做『promoted field』,初始化struct不可以這樣用。 稍微改造一下 newIphone2 := Iphone{ Cellphone{ ID: 1, ...
確定! 回上一頁