37 lines
693 B
Go
37 lines
693 B
Go
package main
|
|
|
|
import (
|
|
"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() {
|
|
// parse the config file
|
|
readConfig()
|
|
|
|
// initialize a new GO GUI instance
|
|
myGui = gui.New()
|
|
myGui.Default()
|
|
|
|
// draw the cloudflare control panel window
|
|
win := cloudflare.MakeCloudflareWindow(myGui)
|
|
win.SetTitle(title)
|
|
win.Show()
|
|
win.Draw()
|
|
|
|
// This is just a optional goroutine to watch that things are alive
|
|
gui.Watchdog()
|
|
gui.StandardExit()
|
|
debugger.DebugWindow()
|
|
|
|
// update the config file
|
|
saveConfig()
|
|
}
|