summaryrefslogtreecommitdiff
path: root/init.go
diff options
context:
space:
mode:
Diffstat (limited to 'init.go')
-rw-r--r--init.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/init.go b/init.go
new file mode 100644
index 0000000..799add6
--- /dev/null
+++ b/init.go
@@ -0,0 +1,17 @@
+// 11 february 2014
+//package ui
+package main
+
+// TODO this will be system-defined
+func initpanic(err error) {
+ panic("failure during init: " + err.Error())
+}
+
+func init() {
+ initDone := make(chan error)
+ go ui(initDone)
+ err := <-initDone
+ if err != nil {
+ initpanic(err)
+ }
+}