diff options
author | Karthik Elango <kelango@redhat.com> | 2022-07-20 16:23:13 -0400 |
---|---|---|
committer | Karthik Elango <kelango@redhat.com> | 2022-08-04 14:55:03 -0400 |
commit | cc8e4d5fec571d6bd69d3d2f8189e945b621ba7b (patch) | |
tree | b47a7e62c202905d9ba2d592d0cfcf84152691ef /pkg/bindings/images | |
parent | b0ef621ebf196fd61189aebff3161927f0049c52 (diff) | |
download | podman-cc8e4d5fec571d6bd69d3d2f8189e945b621ba7b.tar.gz podman-cc8e4d5fec571d6bd69d3d2f8189e945b621ba7b.tar.bz2 podman-cc8e4d5fec571d6bd69d3d2f8189e945b621ba7b.zip |
remove image podman no prune
Signed-off-by: Karthik Elango <kelango@redhat.com>
Diffstat (limited to 'pkg/bindings/images')
-rw-r--r-- | pkg/bindings/images/types.go | 2 | ||||
-rw-r--r-- | pkg/bindings/images/types_remove_options.go | 15 |
2 files changed, 17 insertions, 0 deletions
diff --git a/pkg/bindings/images/types.go b/pkg/bindings/images/types.go index 0664afc1b..9783a8e18 100644 --- a/pkg/bindings/images/types.go +++ b/pkg/bindings/images/types.go @@ -15,6 +15,8 @@ type RemoveOptions struct { Ignore *bool // Confirms if given name is a manifest list and removes it, otherwise returns error. LookupManifest *bool + // Does not remove dangling parent images + NoPrune *bool } //go:generate go run ../generator/generator.go DiffOptions diff --git a/pkg/bindings/images/types_remove_options.go b/pkg/bindings/images/types_remove_options.go index 559ebcfd5..8972ac93c 100644 --- a/pkg/bindings/images/types_remove_options.go +++ b/pkg/bindings/images/types_remove_options.go @@ -76,3 +76,18 @@ func (o *RemoveOptions) GetLookupManifest() bool { } return *o.LookupManifest } + +// WithNoPrune set field NoPrune to given value +func (o *RemoveOptions) WithNoPrune(value bool) *RemoveOptions { + o.NoPrune = &value + return o +} + +// GetNoPrune returns value of field NoPrune +func (o *RemoveOptions) GetNoPrune() bool { + if o.NoPrune == nil { + var z bool + return z + } + return *o.NoPrune +} |