summaryrefslogtreecommitdiff
path: root/main.go
blob: d53f2373715b7e2421273058356289df19caeef5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package main

import (
	"go.wit.com/log"
	"go.wit.com/gui"
	"go.wit.com/lib/debugger"
	"go.wit.com/lib/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()
	myGui.LoadToolkit("andlabs")
	myGui.Default()


	// draw the cloudflare control panel window
	win := cloudflare.MakeCloudflareWindow(myGui)
	win.SetTitle(title)
	win.Show()

	// This is just a optional goroutine to watch that things are alive
	gui.Watchdog()
	gui.StandardExit()
	debugger.DebugWindow()

	// update the config file
	saveConfig()
}