mirror of
https://github.com/cgzirim/seek-tune.git
synced 2025-12-19 18:04:18 +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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(matches) == 0 {
|
||||||
|
fmt.Println("\nNo match found.")
|
||||||
|
fmt.Printf("\nSearch took: %s\n", searchDuration)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
msg := "Matches:"
|
msg := "Matches:"
|
||||||
topMatches := matches
|
topMatches := matches
|
||||||
if len(matches) >= 20 {
|
if len(matches) >= 20 {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue