mirror of
https://github.com/containers/podman.git
synced 2025-06-20 17:13:43 +08:00
Merge pull request #6059 from QiWang19/search-limit
search --limit compatible with docker
This commit is contained in:
@ -105,6 +105,10 @@ func imageSearch(cmd *cobra.Command, args []string) error {
|
||||
return errors.Errorf("search requires exactly one argument")
|
||||
}
|
||||
|
||||
if searchOptions.Limit > 100 {
|
||||
return errors.Errorf("Limit %d is outside the range of [1, 100]", searchOptions.Limit)
|
||||
}
|
||||
|
||||
// TLS verification in c/image is controlled via a `types.OptionalBool`
|
||||
// which allows for distinguishing among set-true, set-false, unspecified
|
||||
// which is important to implement a sane way of dealing with defaults of
|
||||
|
@ -59,7 +59,7 @@ Valid placeholders for the Go template are listed below:
|
||||
|
||||
**--limit**=*limit*
|
||||
|
||||
Limit the number of results
|
||||
Limit the number of results. This value can be in the range between 1 and 100. The default number of results is 25.
|
||||
Note: The results from each registry will be limited to this value.
|
||||
Example if limit is 10 and two registries are being searched, the total
|
||||
number of results will be 20, 10 from each (if there are at least 10 matches in each).
|
||||
|
Reference in New Issue
Block a user