diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2021-12-23 06:41:55 -0500 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2022-01-11 14:33:54 -0500 |
commit | 8f2358eeaa59fe369eebc6186403f95c2d66e49b (patch) | |
tree | a454ef259ab28f85b17f53b3273725480aa78515 /pkg/domain/entities/reports | |
parent | c4142ce0cfff792092bf420950b1985058cc241c (diff) | |
download | podman-8f2358eeaa59fe369eebc6186403f95c2d66e49b.tar.gz podman-8f2358eeaa59fe369eebc6186403f95c2d66e49b.tar.bz2 podman-8f2358eeaa59fe369eebc6186403f95c2d66e49b.zip |
Add podman rm --depend
This option causes Podman to not only remove the specified containers
but all of the containers that depend on the specified
containers.
Fixes: https://github.com/containers/podman/issues/10360
Also ran codespell on the code
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg/domain/entities/reports')
-rw-r--r-- | pkg/domain/entities/reports/containers.go | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/pkg/domain/entities/reports/containers.go b/pkg/domain/entities/reports/containers.go new file mode 100644 index 000000000..54bcd092b --- /dev/null +++ b/pkg/domain/entities/reports/containers.go @@ -0,0 +1,28 @@ +package reports + +type RmReport struct { + Id string `json:"Id"` //nolint + Err error `json:"Err,omitempty"` +} + +func RmReportsIds(r []*RmReport) []string { + ids := make([]string, 0, len(r)) + for _, v := range r { + if v == nil || v.Id == "" { + continue + } + ids = append(ids, v.Id) + } + return ids +} + +func RmReportsErrs(r []*RmReport) []error { + errs := make([]error, 0, len(r)) + for _, v := range r { + if v == nil || v.Err == nil { + continue + } + errs = append(errs, v.Err) + } + return errs +} |