add main() as required by golang
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
53946ed046
commit
0d1e4a4cff
|
@ -79,9 +79,12 @@ func doAction(a widget.Action) {
|
||||||
n.State.Pad = false
|
n.State.Pad = false
|
||||||
case widget.Delete:
|
case widget.Delete:
|
||||||
log.Warn("doAction() TODO: Delete()")
|
log.Warn("doAction() TODO: Delete()")
|
||||||
// n.Delete()
|
n.DeleteNode()
|
||||||
case widget.Move:
|
case widget.Move:
|
||||||
log.Warn("doAction() TODO: Move()")
|
log.Warn("doAction() TODO: Move()")
|
||||||
|
case widget.ToolkitClose:
|
||||||
|
log.Warn("doAction() toolkit closed. are the channels cleand up?")
|
||||||
|
return
|
||||||
default:
|
default:
|
||||||
log.Log(ERROR, "doAction() Unknown =", a.ActionType, a.WidgetType)
|
log.Log(ERROR, "doAction() Unknown =", a.ActionType, a.WidgetType)
|
||||||
}
|
}
|
||||||
|
|
5
main.go
5
main.go
|
@ -19,6 +19,9 @@ func init() {
|
||||||
me.myTree.PluginName = "nocui"
|
me.myTree.PluginName = "nocui"
|
||||||
me.myTree.ActionFromChannel = doAction
|
me.myTree.ActionFromChannel = doAction
|
||||||
|
|
||||||
go simpleStdin()
|
|
||||||
log.Log(INFO, "Init() END")
|
log.Log(INFO, "Init() END")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
simpleStdin()
|
||||||
|
}
|
||||||
|
|
1
stdin.go
1
stdin.go
|
@ -20,6 +20,7 @@ func simpleStdin() {
|
||||||
log.Println("Stack trace:")
|
log.Println("Stack trace:")
|
||||||
debug.PrintStack()
|
debug.PrintStack()
|
||||||
me.myTree.DoToolkitPanic()
|
me.myTree.DoToolkitPanic()
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
scanner := bufio.NewScanner(os.Stdin)
|
scanner := bufio.NewScanner(os.Stdin)
|
||||||
|
|
Loading…
Reference in New Issue