Add helper for deleting a container

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
Mrunal Patel 2016-08-16 10:16:05 -07:00
parent c6cf44513e
commit 2513ac2523

View file

@ -77,6 +77,11 @@ func (r *Runtime) StopContainer(c *Container) error {
return utils.ExecCmdWithStdStreams(os.Stdin, os.Stdout, os.Stderr, r.path, "kill", c.name)
}
// DeleteContainer deletes a container.
func (r *Runtime) DeleteContainer(c *Container) error {
return utils.ExecCmdWithStdStreams(os.Stdin, os.Stdout, os.Stderr, r.path, "delete", c.name)
}
// Container respresents a runtime container.
type Container struct {
name string