Files
skopeo/delete.go
Nalin Dahyabhai 0ab0890e4e Massive refactoring
Pull most of the core logic from the CLI into a package that should be
easier to consume as a library.  Add a "config" command that updates the
builder object's configuration.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-02-10 11:48:15 -05:00

24 lines
440 B
Go

package buildah
import (
"fmt"
"os"
)
func (b *Builder) Delete() error {
for _, link := range b.Links {
if err := os.Remove(link); err != nil {
return fmt.Errorf("error removing symlink %q: %v", link, err)
}
}
b.Links = nil
if err := b.store.DeleteContainer(b.ContainerID); err != nil {
return fmt.Errorf("error deleting build container: %v", err)
}
b.MountPoint = ""
b.Container = ""
b.ContainerID = ""
return nil
}