add main() as required by golang

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-01-18 23:07:56 -06:00
parent 53946ed046
commit 0d1e4a4cff
3 changed files with 9 additions and 2 deletions

View File

@ -79,9 +79,12 @@ func doAction(a widget.Action) {
n.State.Pad = false
case widget.Delete:
log.Warn("doAction() TODO: Delete()")
// n.Delete()
n.DeleteNode()
case widget.Move:
log.Warn("doAction() TODO: Move()")
case widget.ToolkitClose:
log.Warn("doAction() toolkit closed. are the channels cleand up?")
return
default:
log.Log(ERROR, "doAction() Unknown =", a.ActionType, a.WidgetType)
}

View File

@ -19,6 +19,9 @@ func init() {
me.myTree.PluginName = "nocui"
me.myTree.ActionFromChannel = doAction
go simpleStdin()
log.Log(INFO, "Init() END")
}
func main() {
simpleStdin()
}

View File

@ -20,6 +20,7 @@ func simpleStdin() {
log.Println("Stack trace:")
debug.PrintStack()
me.myTree.DoToolkitPanic()
return
}
}()
scanner := bufio.NewScanner(os.Stdin)