From: Jeff Halter Date: Sun, 5 Jun 2022 22:34:37 +0000 (-0700) Subject: Add -config flag to client X-Git-Url: https://git.r.bdr.sh/rbdr/mobius/commitdiff_plain/e130e0a2142f123d9d6f9351d0758289f010a1bb?ds=sidebyside Add -config flag to client --- diff --git a/cmd/mobius-hotline-client/main.go b/cmd/mobius-hotline-client/main.go index ec6f895..6bc2d58 100644 --- a/cmd/mobius-hotline-client/main.go +++ b/cmd/mobius-hotline-client/main.go @@ -21,6 +21,7 @@ func main() { sigChan := make(chan os.Signal, 1) signal.Notify(sigChan, syscall.SIGTERM, syscall.SIGINT, os.Interrupt) + configDir := flag.String("config", defaultConfigPath(), "Path to config root") version := flag.Bool("version", false, "print version and exit") logLevel := flag.String("log-level", "info", "Log level") logFile := flag.String("log-file", "", "output logs to file") @@ -70,9 +71,7 @@ func main() { cancelRoot() }() - cfgPath := defaultConfigPath() - - client := hotline.NewClient(cfgPath, logger) + client := hotline.NewClient(*configDir, logger) client.DebugBuf = db client.UI.Start()