From 1bf205e7d82bd3c2f70194f1d75d0b6eaa0add81 Mon Sep 17 00:00:00 2001 From: Bernhard Froehlich Date: Mon, 23 May 2022 15:29:03 +0000 Subject: [PATCH] Compress if statement --- config.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/config.go b/config.go index f2bd411..993fe1b 100644 --- a/config.go +++ b/config.go @@ -195,13 +195,11 @@ func setupTimeouts() { func ConfigLoad() { // configuration parsing - err := ff.Parse(flagset, os.Args[1:], + if err := ff.Parse(flagset, os.Args[1:], ff.WithEnvVarPrefix("smtprelay"), ff.WithConfigFileFlag("config"), ff.WithConfigFileParser(IniParser), - ) - - if err != nil { + ); err != nil { os.Exit(1) }