github.com/alouche/packer@v0.3.7/builder/vmware/artifact.go (about) 1 package vmware 2 3 import ( 4 "fmt" 5 "os" 6 ) 7 8 // Artifact is the result of running the VMware builder, namely a set 9 // of files associated with the resulting machine. 10 type Artifact struct { 11 dir string 12 f []string 13 } 14 15 func (*Artifact) BuilderId() string { 16 return BuilderId 17 } 18 19 func (a *Artifact) Files() []string { 20 return a.f 21 } 22 23 func (*Artifact) Id() string { 24 return "VM" 25 } 26 27 func (a *Artifact) String() string { 28 return fmt.Sprintf("VM files in directory: %s", a.dir) 29 } 30 31 func (a *Artifact) Destroy() error { 32 return os.RemoveAll(a.dir) 33 }