From 3464f9a0f57abcda2be3cc63308eeb323455bd96 Mon Sep 17 00:00:00 2001 From: Yiyang Kang Date: Fri, 7 Oct 2022 01:48:10 +0800 Subject: [PATCH] fix: panic --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 8124642..6566fa2 100644 --- a/main.go +++ b/main.go @@ -16,7 +16,8 @@ var ( func main() { if err := cfg.LoadAuto(); err != nil { - panic(err) + msg.Errorf("Failed to load config: %v", err) + os.Exit(1) } flag.Parse()