Fix panic with checkerr

This commit is contained in:
cnone 2019-05-20 19:20:41 +03:00
parent 030f6607f0
commit ce78299464

View File

@ -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{