From 176a14081966c9886c763b9c2abd201a39b4c00c Mon Sep 17 00:00:00 2001 From: Ethan Cheng Date: Sat, 13 Sep 2025 13:36:04 -0700 Subject: [PATCH] only print word if no error --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 76e33f3..f089337 100644 --- a/main.go +++ b/main.go @@ -57,9 +57,9 @@ func main() { word, err := findWord(bitmap) if err != nil { fmt.Fprintf(os.Stderr, "%s: %s\n", os.Args[0], err) + } else { + fmt.Println(word) } - - fmt.Println(word) } if err := scanner.Err(); err != nil {