mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-15 21:29:32 +00:00
Including the RawInput in the API output is meaningless. Fixes: #16497 [NO NEW TESTS NEEDED] Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
29 lines
554 B
Go
29 lines
554 B
Go
package reports
|
|
|
|
type RmReport struct {
|
|
Id string `json:"Id"` //nolint:revive,stylecheck
|
|
Err error `json:"Err,omitempty"`
|
|
RawInput string `json:"-"`
|
|
}
|
|
|
|
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
|
|
}
|