mirror of
https://github.com/containers/podman.git
synced 2025-12-01 02:27:13 +08:00
Merge pull request #27142 from nothiaki/feat-artifact-rm-ignore
Feat artifact rm ignore
This commit is contained in:
@@ -52,6 +52,8 @@ type RemoveOptions struct {
|
||||
All *bool
|
||||
// Artifacts is a list of Artifact IDs or names to remove
|
||||
Artifacts []string
|
||||
// Ignore errors if IDs or names are not defined
|
||||
Ignore *bool
|
||||
}
|
||||
|
||||
// AddOptions are optional options for removing images
|
||||
|
||||
@@ -46,3 +46,18 @@ func (o *RemoveOptions) GetArtifacts() []string {
|
||||
}
|
||||
return o.Artifacts
|
||||
}
|
||||
|
||||
// WithIgnore set field Ignore to given value
|
||||
func (o *RemoveOptions) WithIgnore(value bool) *RemoveOptions {
|
||||
o.Ignore = &value
|
||||
return o
|
||||
}
|
||||
|
||||
// GetIgnore returns value of field Ignore
|
||||
func (o *RemoveOptions) GetIgnore() bool {
|
||||
if o.Ignore == nil {
|
||||
var z bool
|
||||
return z
|
||||
}
|
||||
return *o.Ignore
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user