From d2bce37935d99cabcebb4b2bbab2b6ea45ca645d Mon Sep 17 00:00:00 2001 From: Aadhavan Srinivasan Date: Wed, 12 Mar 2025 16:46:05 -0400 Subject: [PATCH] Updated argument count validation --- cmd/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/main.go b/cmd/main.go index 7da277d..d3d7be5 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -64,7 +64,7 @@ func main() { // 2. Build NFA from postfix representation (Thompson's algorithm) // 3. Run the string against the NFA - if len(flag.Args()) != 1 { // flag.Args() also strips out program name + if len(flag.Args()) < 1 || len(flag.Args()) > 2 { // flag.Args() also strips out program name fmt.Println("ERROR: Missing cmdline args") os.Exit(22) }