From 8e91c255a379d07a13c5f62b71f33d9abed13f73 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Sun, 19 Apr 2020 10:47:55 +0200 Subject: [PATCH] Make FindPackageMatch match packages HumanReadableString --- pkg/package/database_boltdb.go | 2 +- pkg/package/database_mem.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/package/database_boltdb.go b/pkg/package/database_boltdb.go index 63c4f0ed..bdff49ad 100644 --- a/pkg/package/database_boltdb.go +++ b/pkg/package/database_boltdb.go @@ -436,7 +436,7 @@ func (db *BoltDatabase) FindPackageMatch(pattern string) (Packages, error) { return ans, err } - if re.MatchString(pack.GetCategory() + pack.GetName()) { + if re.MatchString(pack.HumanReadableString()) { ans = append(ans, pack) } } diff --git a/pkg/package/database_mem.go b/pkg/package/database_mem.go index 1cf0d6ed..c291bcef 100644 --- a/pkg/package/database_mem.go +++ b/pkg/package/database_mem.go @@ -411,7 +411,7 @@ func (db *InMemoryDatabase) FindPackageMatch(pattern string) (Packages, error) { return ans, err } - if re.MatchString(pack.GetCategory() + pack.GetName()) { + if re.MatchString(pack.HumanReadableString()) { ans = append(ans, pack) } }