summaryrefslogtreecommitdiff
path: root/args.go
diff options
context:
space:
mode:
Diffstat (limited to 'args.go')
-rw-r--r--args.go25
1 files changed, 13 insertions, 12 deletions
diff --git a/args.go b/args.go
index 8e6bb4d..cf68339 100644
--- a/args.go
+++ b/args.go
@@ -6,17 +6,18 @@ package main
this enables command line options from other packages like 'gui' and 'log'
*/
-import (
+import (
"time"
- arg "github.com/alexflint/go-arg"
+
+ "go.wit.com/dev/alexflint/arg"
+ "go.wit.com/lib/debugger"
"go.wit.com/log"
- "go.wit.com/gui/debugger"
)
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"`
+ 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
@@ -35,15 +36,15 @@ func init() {
full := "go.wit.com/control-panels/dns"
short := "cpdns"
- NOW = log.NewFlag( "NOW", true, full, short, "temp debugging stuff")
+ 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()")
+ 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")
+ 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")
+ CHANGE = log.NewFlag("CHANGE", true, full, short, "when host or dns change")
STATUS = log.NewFlag("STATUS", false, full, short, "updateStatus() polling")
if debugger.ArgDebug() {
@@ -55,7 +56,7 @@ func init() {
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.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)