diff options
| author | Jeff Carr <[email protected]> | 2025-10-07 08:10:18 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-07 08:10:18 -0500 |
| commit | 77d0a62cd49aa8d6ee99cf9db0e7faf71c79d8de (patch) | |
| tree | e31df8408e39a9bf148cd9faa5b75e859c7cd087 | |
| parent | b4c737473ed96d42602ec0013dd0e0e84c1536c0 (diff) | |
| -rw-r--r-- | doGui.go | 3 | ||||
| -rw-r--r-- | main.go | 9 |
2 files changed, 5 insertions, 7 deletions
@@ -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() } @@ -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") |
