Make FindPackageMatch match packages HumanReadableString

This commit is contained in:
Ettore Di Giacinto 2020-04-19 10:47:55 +02:00
parent 62381ed46d
commit 8e91c255a3
No known key found for this signature in database
GPG Key ID: 1ADA699B145A2D1C
2 changed files with 2 additions and 2 deletions

View File

@ -436,7 +436,7 @@ func (db *BoltDatabase) FindPackageMatch(pattern string) (Packages, error) {
return ans, err return ans, err
} }
if re.MatchString(pack.GetCategory() + pack.GetName()) { if re.MatchString(pack.HumanReadableString()) {
ans = append(ans, pack) ans = append(ans, pack)
} }
} }

View File

@ -411,7 +411,7 @@ func (db *InMemoryDatabase) FindPackageMatch(pattern string) (Packages, error) {
return ans, err return ans, err
} }
if re.MatchString(pack.GetCategory() + pack.GetName()) { if re.MatchString(pack.HumanReadableString()) {
ans = append(ans, pack) ans = append(ans, pack)
} }
} }