From a41b4a8ac22cfa9a6fa75e6cb40442d4226fa63e Mon Sep 17 00:00:00 2001 From: Timon Ringwald Date: Mon, 25 Jul 2022 17:15:16 +0200 Subject: [PATCH] error messages improved --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index b5783d7..01e3710 100644 --- a/main.go +++ b/main.go @@ -22,7 +22,8 @@ func main() { envFile, err := os.Open(*EnvFilePath) if err != nil { - panic(err) + fmt.Fprintf(os.Stderr, "could not open file '%s': %s\n", *EnvFilePath, err.(*os.PathError).Err) + return } defer envFile.Close()