From f4a69647659df356f7f1d1ab1d8b4eedcc34dfba Mon Sep 17 00:00:00 2001 From: Jeff Halter <868228+jhalter@users.noreply.github.com> Date: Mon, 6 Jun 2022 16:46:10 -0700 Subject: Improve handling of client config default path --- hotline/client.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'hotline') diff --git a/hotline/client.go b/hotline/client.go index 24df7c3..1e2972f 100644 --- a/hotline/client.go +++ b/hotline/client.go @@ -103,8 +103,7 @@ func NewClient(cfgPath string, logger *zap.SugaredLogger) *Client { prefs, err := readConfig(cfgPath) if err != nil { - fmt.Printf("unable to read config file %s", cfgPath) - os.Exit(1) + logger.Fatal(fmt.Sprintf("unable to read config file %s\n", cfgPath)) } c.pref = prefs -- cgit