summaryrefslogtreecommitdiff
path: root/args.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-12 21:42:02 -0600
committerJeff Carr <[email protected]>2024-02-12 21:42:02 -0600
commit84c1341b8cd2a23e77251d2dde4ea0bb3b22c0ff (patch)
treecd9658bb2a5b0228ee2886b9e02d2b101972c3bf /args.go
parent511ffdcd23cd0fa4aab8353409460ba8a0b0be20 (diff)
use standard debugger.go filev0.20.7v0.20.6v0.20.5v0.20.4
Diffstat (limited to 'args.go')
-rw-r--r--args.go64
1 files changed, 0 insertions, 64 deletions
diff --git a/args.go b/args.go
deleted file mode 100644
index cf68339..0000000
--- a/args.go
+++ /dev/null
@@ -1,64 +0,0 @@
-package main
-
-/*
- this parses the command line arguements
-
- this enables command line options from other packages like 'gui' and 'log'
-*/
-
-import (
- "time"
-
- "go.wit.com/dev/alexflint/arg"
- "go.wit.com/lib/debugger"
- "go.wit.com/log"
-)
-
-var args struct {
- Display string `arg:"env:DISPLAY"`
- TmpLog bool `arg:"--tmp-log" help:"automatically send STDOUT to /tmp"`
- VerboseDNS bool `arg:"--verbose-dns" help:"debug your dns settings"`
-}
-
-var NOW *log.LogFlag
-var INFO *log.LogFlag
-var NET *log.LogFlag
-var DNS *log.LogFlag
-
-var WARN *log.LogFlag
-var SPEW *log.LogFlag
-
-var CHANGE *log.LogFlag
-var STATUS *log.LogFlag
-
-func init() {
- arg.MustParse(&args)
- full := "go.wit.com/control-panels/dns"
- short := "cpdns"
-
- NOW = log.NewFlag("NOW", true, full, short, "temp debugging stuff")
- INFO = log.NewFlag("INFO", false, full, short, "normal debugging stuff")
- NET = log.NewFlag("NET", false, full, short, "Network logging")
- DNS = log.NewFlag("DNS", false, full, short, "dnsStatus.update()")
-
- WARN = log.NewFlag("WARN", true, full, short, "bad things")
- SPEW = log.NewFlag("SPEW", false, full, short, "spew stuff")
-
- CHANGE = log.NewFlag("CHANGE", true, full, short, "when host or dns change")
- STATUS = log.NewFlag("STATUS", false, full, short, "updateStatus() polling")
-
- if debugger.ArgDebug() {
- log.Log(NOW, "INIT() gui debug == true")
- } else {
- log.Log(NOW, "INIT() gui debug == false")
- }
-
- me.dnsSleep = 500 * time.Millisecond
- me.localSleep = 100 * time.Millisecond
-
- me.artificialSleep = 0.4 // seems to need to exist or GTK crashes. TODO: fix andlabs plugin
- me.artificialS = "blah"
- log.Log(INFO, "init() me.artificialSleep =", me.artificialSleep)
- log.Log(INFO, "init() me.artificialS =", me.artificialS)
- log.Sleep(me.artificialSleep)
-}