mirror of
https://github.com/cgzirim/seek-tune.git
synced 2025-12-17 08:54:19 +00:00
Handle case where no match was found
This commit is contained in:
parent
b3b46cf21b
commit
783c81ae0f
1 changed files with 6 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue