package main import ( "go.wit.com/toolkits/tree" "go.wit.com/widget" ) func initWidget(n *tree.Node) *guiWidget { var w *guiWidget w = new(guiWidget) if n.WidgetType == widget.Root { n.WidgetId = 0 me.treeRoot = n return w } return w }