我在 go 编程语言的 page187 中看到了这种语法。
var tracks = []*Track{
{"Go", "Delilah", "From the Roots Up", 2012, length("3m38s")},
{"Go", "Moby", "Moby", 1992, length("3m37s")},
{"Go Ahead", "Alicia Keys", "As I Am", 2007, length("4m36s")},
{"Ready 2 Go", "Martin Solveig", "Smash", 2011, length("4m24s")},
}
它只是一个语法糖吗
var tracks = []*Track{
&Track{"Go", "Delilah", "From the Roots Up", 2012, length("3m38s")},
&Track{"Go", "Moby", "Moby", 1992, length("3m37s")},
&Track{"Go Ahead", "Alicia Keys", "As I Am", 2007, length("4m36s")},
&Track{"Ready 2 Go", "Martin Solveig", "Smash", 2011, length("4m24s")},
}
我没有用谷歌搜索它的规格,如果有,请给我链接。
呼唤远方
相关分类