From a1892cbe37232542510393e038be3fb457145959 Mon Sep 17 00:00:00 2001 From: yo Date: Mon, 11 Sep 2023 16:14:33 +0200 Subject: [PATCH] Bugfix when no input file specified --- main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index eaa4b08..497efc9 100644 --- a/main.go +++ b/main.go @@ -33,7 +33,7 @@ import ( ) const ( - version = "0.6" + version = "0.6.1" ) var ( @@ -84,6 +84,10 @@ func main() { } args := os.Args + if len(os.Args) < 2 { + pflag.Usage() + os.Exit(1) + } filename := args[len(args)-1] var f *os.File