From 306e07ee0228344e1e858722229ac73289ee156f Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 29 Jun 2023 10:01:17 +0300 Subject: use log.Fatal --- internal/config.go | 2 +- internal/run.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/config.go b/internal/config.go index ec6f6fd..45ccc89 100644 --- a/internal/config.go +++ b/internal/config.go @@ -40,7 +40,7 @@ func newConfig(configFile string) (config, error) { if conf.SMTPServer == "" { hostname, err := os.Hostname() if err != nil { - panic(err) + log.Fatal(err) } conf.SMTPServer = fmt.Sprintf("%s:25", hostname) log.Println("Set SMTPServer to " + conf.SMTPServer) diff --git a/internal/run.go b/internal/run.go index 0fd0ef1..00bb129 100644 --- a/internal/run.go +++ b/internal/run.go @@ -8,7 +8,7 @@ import ( func Run(ctx context.Context, configFile string, renotify bool) { conf, err := newConfig(configFile) if err != nil { - panic(err) + log.Fatal(err) } if err := conf.sanityCheck(); err != nil { -- cgit v1.2.3