diff options
author | Kunal Kushwaha <kunal.kushwaha@gmail.com> | 2019-11-14 17:30:46 +0900 |
---|---|---|
committer | Kunal Kushwaha <kunal.kushwaha@gmail.com> | 2019-11-22 17:36:27 +0900 |
commit | 5082496cc05a11d72e8658cce857523df41c203f (patch) | |
tree | 7a0df9ec7788943e423087d2b95609b398c96e83 /libpod/image/image.go | |
parent | c200583f31d624fb42897d4083edc611b40a93d5 (diff) | |
download | podman-5082496cc05a11d72e8658cce857523df41c203f.tar.gz podman-5082496cc05a11d72e8658cce857523df41c203f.tar.bz2 podman-5082496cc05a11d72e8658cce857523df41c203f.zip |
filter added to image pruge command.
filter option accepts two filters.
- label
- until
label supports "label=value" or "label=key=value" format
until supports all golang compatible time/duration formats.
Signed-off-by: Kunal Kushwaha <kunal.kushwaha@gmail.com>
Diffstat (limited to 'libpod/image/image.go')
-rw-r--r-- | libpod/image/image.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libpod/image/image.go b/libpod/image/image.go index c912ac2ca..5871c8a57 100644 --- a/libpod/image/image.go +++ b/libpod/image/image.go @@ -74,6 +74,11 @@ type InfoImage struct { Layers []LayerInfo } +// ImageFilter is a function to determine whether a image is included +// in command output. Images to be outputted are tested using the function. +// A true return will include the image, a false return will exclude it. +type ImageFilter func(*Image) bool //nolint + // ErrRepoTagNotFound is the error returned when the image id given doesn't match a rep tag in store var ErrRepoTagNotFound = stderrors.New("unable to match user input to any specific repotag") |