From 8a49b59ed403b25340f315b3cb9ea90482ad6cd9 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Tue, 19 Feb 2019 15:09:19 +0100 Subject: image.SearchImages: use SearchFilter type Use an `image.SearchFilter` instead of a `[]string` in the SearchImages API. Signed-off-by: Valentin Rothberg --- pkg/varlinkapi/images.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'pkg/varlinkapi/images.go') diff --git a/pkg/varlinkapi/images.go b/pkg/varlinkapi/images.go index f4b8a7e18..032160b1b 100644 --- a/pkg/varlinkapi/images.go +++ b/pkg/varlinkapi/images.go @@ -435,9 +435,14 @@ func (i *LibpodAPI) RemoveImage(call iopodman.VarlinkCall, name string, force bo // SearchImages searches all registries configured in /etc/containers/registries.conf for an image // Requires an image name and a search limit as int func (i *LibpodAPI) SearchImages(call iopodman.VarlinkCall, query string, limit *int64, tlsVerify *bool, filter []string) error { + sFilter, err := image.ParseSearchFilter(filter) + if err != nil { + return call.ReplyErrorOccurred(err.Error()) + } + searchOptions := image.SearchOptions{ Limit: 1000, - Filter: filter, + Filter: *sFilter, InsecureSkipTLSVerify: types.NewOptionalBool(!*tlsVerify), } results, err := image.SearchImages(query, searchOptions) -- cgit v1.2.3-54-g00ecf