diff --git a/cmd/config.go b/cmd/config.go index 932c1229..888a3fa6 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -72,7 +72,7 @@ func getAuthentication(flags *pflag.FlagSet, defaults ...interface{}) (settings. } if header == "" { - panic(nerrors.New("you must set the flag 'auth.header' for method 'proxy'")) + checkErr(nerrors.New("you must set the flag 'auth.header' for method 'proxy'")) } auther = &auth.ProxyAuth{Header: header} @@ -99,7 +99,7 @@ func getAuthentication(flags *pflag.FlagSet, defaults ...interface{}) (settings. } if key == "" || secret == "" { - panic(nerrors.New("you must set the flag 'recaptcha.key' and 'recaptcha.secret' for method 'json'")) + checkErr(nerrors.New("you must set the flag 'recaptcha.key' and 'recaptcha.secret' for method 'json'")) } jsonAuth.ReCaptcha = &auth.ReCaptcha{