summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go13
1 files changed, 3 insertions, 10 deletions
diff --git a/main.go b/main.go
index 2ab076e..73f2b9a 100644
--- a/main.go
+++ b/main.go
@@ -16,19 +16,12 @@ import (
"go.wit.com/log"
)
-// sent via -ldflags
-var VERSION string
-var BUILDTIME string
-
-// used for shell auto completion
-var ARGNAME string = "zood"
-
//go:embed resources/*
var resources embed.FS
func main() {
me = new(zoodStruct)
- me.sh = argvpb.Autocomplete(&argv) // adds shell auto complete to go-args
+ me.argv = argvpb.Autocomplete(&argv) // adds shell auto complete to go-args
if argv.Daemon {
// turn off timestamps for STDOUT (systemd adds them)
@@ -40,13 +33,13 @@ func main() {
if argv.Status != nil {
log.Info("todo: show status here")
- me.sh.GoodExit("says hi")
+ me.argv.GoodExit("says hi")
}
if err := testZoo(); err != nil {
log.Info("failed to connect. sleeping for 3 minutes")
time.Sleep(3 * time.Minute)
- me.sh.BadExit("failed to connect to zookeeper", err)
+ me.argv.BadExit("failed to connect to zookeeper", err)
}
me.pollDelay = 3 * time.Second
me.failcountmax = 20 // die every minute if zookeeper can't be found