From 77d0a62cd49aa8d6ee99cf9db0e7faf71c79d8de Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 7 Oct 2025 08:10:18 -0500 Subject: fix build --- doGui.go | 3 ++- main.go | 9 +++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/doGui.go b/doGui.go index cf60165..e347bac 100644 --- a/doGui.go +++ b/doGui.go @@ -77,5 +77,6 @@ func saveMachineState() { log.Info("have machine:", m.Hostname) cur.Append(m) } - cur.ConfigSave(me.machinesfile) + cur.Filename = me.machines.Filename + cur.Save() } diff --git a/main.go b/main.go index be28e36..5e7b520 100644 --- a/main.go +++ b/main.go @@ -7,6 +7,7 @@ import ( "os" "time" + "go.wit.com/lib/config" "go.wit.com/lib/gui/prep" "go.wit.com/lib/protobuf/httppb" "go.wit.com/lib/protobuf/zoopb" @@ -31,12 +32,8 @@ func main() { me.hostname, _ = os.Hostname() me.pollDelay = time.Hour me.machines = zoopb.NewMachines() - if fpath, err := me.machines.ConfigLoad(); err != nil { - log.Warn("load config failed", err) - me.machinesfile = fpath - // os.Exit(-1) - } else { - me.machinesfile = fpath + if err := config.ConfigLoad(me.machines, "zookeeper", "machine"); err != nil { + badExit(err) } if argv.List != nil { log.Info("do list here") -- cgit v1.2.3