From ce78299464a299c2c467b992c751551b80738d06 Mon Sep 17 00:00:00 2001
From: cnone <sinanulker386@gmail.com>
Date: Mon, 20 May 2019 19:20:41 +0300
Subject: [PATCH] Fix panic with checkerr

---
 cmd/config.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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{