type mod struct { src string dst string}func(m *mod)New(){ m.src = "a" m.dst = "b"}var( v = map[string]interface{} { "file":mod{}, "time":mod{}, })v["file"].New()我收到一個錯誤:無效的限定類型,需要 packagename.identifier,找到:v["file"].New <*ast.SelectorExpr>**有沒有辦法直接調(diào)用會員的方法**
- 2 回答
- 0 關(guān)注
- 131 瀏覽
添加回答
舉報
0/150
提交
取消