diff options
| author | Jeff Carr <[email protected]> | 2023-12-28 15:36:05 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-12-28 15:36:05 -0600 |
| commit | 8afc73da048204f4245e0c850436c1e3e70055a5 (patch) | |
| tree | 48b03e9be15ba299a35285a98e06ad12b5c29ce6 /main.go | |
| parent | 6fa6d6dfc9e5a88e7dff2ed3c148b3b4271f566c (diff) | |
DNS status window Show() and Hide()
display HTTPS results from dns.google.com for go.wit.com
use a grid instead of boxes
start go.wit.com/log
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 21 |
1 files changed, 4 insertions, 17 deletions
@@ -13,6 +13,7 @@ import ( "time" "embed" + "go.wit.com/log" "go.wit.com/gui" "github.com/miekg/dns" ) @@ -35,22 +36,14 @@ func main() { me.ipv4s = make(map[string]dns.RR) me.ipv6s = make(map[string]dns.RR) - // will set all debugging flags - // gui.SetDebug(true) + // send all log() output to a file in /tmp + log.SetTmp() - // myGui = gui.New().InitEmbed(resToolkit).LoadToolkit("gocui") myGui = gui.New().Default() sleep(me.artificialSleep) setupControlPanelWindow() - /* - if (args.GuiDebug) { - gui.DebugWindow() - } - gui.ShowDebugValues() - */ - // forever monitor for network and dns changes sleep(me.artificialSleep) checkNetworkChanges() @@ -83,13 +76,7 @@ func (c *Cron) run() { func checkNetworkChanges() { var lastLocal time.Time = time.Now() var lastDNS time.Time = time.Now() - /* -func timeFunction(f func()) time.Duration { - startTime := time.Now() // Record the start time - f() // Execute the function - return time.Since(startTime) // Calculate the elapsed time -} -*/ + timer2 := time.NewTimer(time.Second) go func() { <-timer2.C |
