X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=titles.go;h=da36e313075b58af5318cbec2d099f85fe912a91;hb=fbcc6296ee6547aa88c6e6b4491a617a916ee107;hp=19f56a172a0dc070a7659718980178a1be3adc69;hpb=59218ebf4cf9c2353dfa2cb416ee7d2542a3b9b9;p=go-anidb.git diff --git a/titles.go b/titles.go index 19f56a1..da36e31 100644 --- a/titles.go +++ b/titles.go @@ -17,6 +17,9 @@ func SearchAnime(name string) AID { // Searches for all anime that match the given anime name, case sensitive. func SearchAnimeAll(name string) titles.ResultSet { + if name == "" { + return nil + } return titlesDB.FuzzySearch(name) } @@ -33,5 +36,8 @@ func SearchAnimeFold(name string) AID { // Searches for all anime that match the given anime name, case folding. func SearchAnimeFoldAll(name string) titles.ResultSet { + if name == "" { + return nil + } return titlesDB.FuzzySearchFold(name) }