From 85c1aff8ab8de219a4d00f102a8a2c3da7a388cc Mon Sep 17 00:00:00 2001 From: yo Date: Wed, 6 Sep 2023 21:33:44 +0200 Subject: [PATCH] Return -1 when input file not available --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 65a54e0..20507dd 100644 --- a/main.go +++ b/main.go @@ -91,7 +91,7 @@ func main() { f, err = os.Open(filename) if err != nil { fmt.Printf("Impossible d'ouvrir le fichier %s\n", filename) - return + os.Exit(-1) } r = bufio.NewReader(f) }