Merge pull request #3693 from QiWang19/search

fix search output limit
This commit is contained in:
OpenShift Merge Robot
2019-08-02 01:22:44 +02:00
committed by GitHub
3 changed files with 18 additions and 5 deletions

View File

@@ -162,8 +162,11 @@ func searchImageInRegistry(term string, registry string, options SearchOptions)
if len(results) < limit {
limit = len(results)
}
if options.Limit != 0 && options.Limit < len(results) {
limit = options.Limit
if options.Limit != 0 {
limit = len(results)
if options.Limit < len(results) {
limit = options.Limit
}
}
paramsArr := []SearchResult{}