2
我有下面的代碼塊:Golang參考列表
package main
import (
"fmt"
"container/list"
)
type Foo struct {
foo list //want a reference to the list implementation
//supplied by the language
}
func main() {
//empty
}
當編譯我收到以下消息:
使用包列表的不選擇器
我的問題是,我該如何參考list
內struct
?或者,這不是圍繞結構的Go的適當成語。 (構圖)
確實。因爲它與錯誤無關,所以省略了我的主體。 – Woot4Moo