mirror of
https://github.com/containers/podman.git
synced 2026-08-07 04:43:04 -04:00
The removeContainer function now accepts a struct
We had something like 6 different boolean options (removing a container turns out to be rather complicated, because there are a million-odd things that want to do it), and the function signature was getting unreasonably large. Change to a struct to clean things up. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
1 parent
4e6efbbbb3
commit
2c9f18182a
6 files changed
+100
-26
No files matched your search
@@ -143,7 +143,13 @@ func (r *Runtime) removeMalformedPod(ctx context.Context, p *Pod, ctrs []*Contai
|
||||
ctrNamedVolumes[vol.Name] = vol
|
||||
}
|
||||
|
||||
_, _, err := r.removeContainer(ctx, ctr, force, false, true, true, false, false, timeout)
|
||||
opts := ctrRmOpts{
|
||||
Force: force,
|
||||
RemovePod: true,
|
||||
IgnoreDeps: true,
|
||||
Timeout: timeout,
|
||||
}
|
||||
_, _, err := r.removeContainer(ctx, ctr, opts)
|
||||
return err
|
||||
}()
|
||||
removedCtrs[ctr.ID()] = err
|
||||
|
||||
Reference in new issue
Block a user