我在github.com/therecipe/qt
示例(https://github.com/therecipe/examples/blob/master/advanced/widgets/tableview/main.go#L18)中遇到了以下问题
有一个结构(在下面简化):
type CustomTableModel struct {
core.QAbstractTableModel
_ func() `constructor:"init"`
}
我从未见过将结构定义为_
的引用,这甚至意味着什么?我假定其“私有”,并且只能通过结构标签reflect
constructor:"init"
魔术来访问
我找不到任何有关此工作原理,合法性或其他任何内容的参考。结果,这是我所见过的最钝的golang代码(如果可以按照我的猜测运行,那就聪明了,但这并不是真正的补充)。
帮助:运作方式(合法|规范文档?)