diff options
| author | Paul Buetow <paul@buetow.org> | 2023-06-29 10:01:17 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2023-06-29 10:01:17 +0300 |
| commit | 306e07ee0228344e1e858722229ac73289ee156f (patch) | |
| tree | ca63861274249d953bc160ca0b2f439d200c3dd7 | |
| parent | b9fe75d297116ed9c91cd312c5fc9fef2d1ef329 (diff) | |
use log.Fatal
| -rw-r--r-- | internal/config.go | 2 | ||||
| -rw-r--r-- | 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 { |
