]> git.r.bdr.sh - rbdr/mobius/blobdiff - hotline/client.go
Improve handling of client config default path
[rbdr/mobius] / hotline / client.go
index 24df7c35aa8caddf1c6084d96d2860dc1883bb0e..1e2972f6c8aa18c3e48a6985776641f1142c76ed 100644 (file)
@@ -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