summaryrefslogtreecommitdiff
path: root/libpod/image/search.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-06-15 09:19:40 -0400
committerGitHub <noreply@github.com>2020-06-15 09:19:40 -0400
commitf4c3b718eb22a161a897a6ed55d10f3a07e31aa8 (patch)
treebb453d40a50f8cef1ebfedc73e43e2c7fe7d3456 /libpod/image/search.go
parente94e3fd2e829fd2cd38428aa9d9bf68b37bb8407 (diff)
parent200cfa41a434b7143620c2c252b3eb7ab3ef92f9 (diff)
downloadpodman-f4c3b718eb22a161a897a6ed55d10f3a07e31aa8.tar.gz
podman-f4c3b718eb22a161a897a6ed55d10f3a07e31aa8.tar.bz2
podman-f4c3b718eb22a161a897a6ed55d10f3a07e31aa8.zip
Merge pull request #6557 from rhatdan/lint
Turn on More linters
Diffstat (limited to 'libpod/image/search.go')
-rw-r--r--libpod/image/search.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/libpod/image/search.go b/libpod/image/search.go
index fd29dac45..f8d45d576 100644
--- a/libpod/image/search.go
+++ b/libpod/image/search.go
@@ -93,8 +93,8 @@ func SearchImages(term string, options SearchOptions) ([]SearchResult, error) {
searchImageInRegistryHelper := func(index int, registry string) {
defer sem.Release(1)
defer wg.Done()
- searchOutput, err := searchImageInRegistry(term, registry, options)
- data[index] = searchOutputData{data: searchOutput, err: err}
+ searchOutput := searchImageInRegistry(term, registry, options)
+ data[index] = searchOutputData{data: searchOutput}
}
ctx := context.Background()
@@ -131,7 +131,7 @@ func getRegistries(registry string) ([]string, error) {
return registries, nil
}
-func searchImageInRegistry(term string, registry string, options SearchOptions) ([]SearchResult, error) {
+func searchImageInRegistry(term string, registry string, options SearchOptions) []SearchResult {
// Max number of queries by default is 25
limit := maxQueries
if options.Limit > 0 {
@@ -147,7 +147,7 @@ func searchImageInRegistry(term string, registry string, options SearchOptions)
results, err := docker.SearchRegistry(context.TODO(), sc, registry, term, limit)
if err != nil {
logrus.Errorf("error searching registry %q: %v", registry, err)
- return []SearchResult{}, nil
+ return []SearchResult{}
}
index := registry
arr := strings.Split(registry, ".")
@@ -201,7 +201,7 @@ func searchImageInRegistry(term string, registry string, options SearchOptions)
}
paramsArr = append(paramsArr, params)
}
- return paramsArr, nil
+ return paramsArr
}
// ParseSearchFilter turns the filter into a SearchFilter that can be used for