From 53ec479685a7636a1bcc75bf3a88fbf7d95ba72a Mon Sep 17 00:00:00 2001 From: Toshiki Sonoda Date: Sat, 30 Jul 2022 09:28:22 +0900 Subject: Add rm --filter option --filter : remove the filtered container. Signed-off-by: Toshiki Sonoda --- pkg/domain/entities/containers.go | 1 + pkg/domain/entities/reports/containers.go | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'pkg/domain/entities') diff --git a/pkg/domain/entities/containers.go b/pkg/domain/entities/containers.go index df793034b..7048cd1d2 100644 --- a/pkg/domain/entities/containers.go +++ b/pkg/domain/entities/containers.go @@ -131,6 +131,7 @@ type RestartReport struct { } type RmOptions struct { + Filters map[string][]string All bool Depend bool Force bool diff --git a/pkg/domain/entities/reports/containers.go b/pkg/domain/entities/reports/containers.go index db9a66012..6759fc402 100644 --- a/pkg/domain/entities/reports/containers.go +++ b/pkg/domain/entities/reports/containers.go @@ -1,8 +1,9 @@ package reports type RmReport struct { - Id string `json:"Id"` //nolint:revive,stylecheck - Err error `json:"Err,omitempty"` + Id string `json:"Id"` //nolint:revive,stylecheck + Err error `json:"Err,omitempty"` + RawInput string } func RmReportsIds(r []*RmReport) []string { -- cgit v1.2.3-54-g00ecf