summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-01 15:27:59 -0600
committerJeff Carr <[email protected]>2024-01-01 15:27:59 -0600
commit5e485f20d9893034eb37d4c92608ee4cb9b57c6a (patch)
tree72e86e072513a5e3165e11bc1d946ce86a77c36b /main.go
initial commit
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'main.go')
-rw-r--r--main.go35
1 files changed, 35 insertions, 0 deletions
diff --git a/main.go b/main.go
new file mode 100644
index 0000000..7bf7c4a
--- /dev/null
+++ b/main.go
@@ -0,0 +1,35 @@
+package main
+
+import (
+ "go.wit.com/log"
+ "go.wit.com/gui/gui"
+ "go.wit.com/gui/cloudflare"
+)
+
+var title string = "Cloudflare DNS Control Panel"
+
+var myGui *gui.Node
+
+// var cloudflareURL string = "https://api.cloudflare.com/client/v4/zones/"
+
+func main() {
+ // send all log() output to a file in /tmp
+ log.SetTmp()
+
+ // parse the config file
+ readConfig()
+
+ // initialize a new GO GUI instance
+ myGui = gui.New().Default()
+
+ // draw the cloudflare control panel window
+ win := cloudflare.MakeCloudflareWindow(myGui)
+ win.SetText(title)
+
+ // This is just a optional goroutine to watch that things are alive
+ gui.Watchdog()
+ gui.StandardExit()
+
+ // update the config file
+ saveConfig()
+}