diff --git a/cmdHandlers.go b/cmdHandlers.go index 0021edf..f125aef 100644 --- a/cmdHandlers.go +++ b/cmdHandlers.go @@ -49,6 +49,12 @@ func find(filePath string) { return } + if len(matches) == 0 { + fmt.Println("\nNo match found.") + fmt.Printf("\nSearch took: %s\n", searchDuration) + return + } + msg := "Matches:" topMatches := matches if len(matches) >= 20 {