Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CachedDealer ¶
type CachedDealer struct {
// contains filtered or unexported fields
}
CachedDealer is the implementation of the Dealer interface, responsible for creating a working directory of a source directory. It allows Gremlins not to work in the actual source directory messing up with the source code files.
func NewCachedDealer ¶
func NewCachedDealer(workDir, srcDir string) *CachedDealer
NewCachedDealer instantiates a new Dealer that keeps a cache of the instantiated folders. Every time a new working directory is requested with the same identifier, the same folder reference is returned.
func (*CachedDealer) Clean ¶
func (cd *CachedDealer) Clean()
Clean frees all the cached folders and removes all of them from disk.
func (*CachedDealer) Get ¶
func (cd *CachedDealer) Get(idf string) (string, error)
Get provides a working directory where all the files are full copies to the original files in the source directory.
func (*CachedDealer) WorkDir ¶ added in v0.5.0
func (cd *CachedDealer) WorkDir() string
WorkDir provides the root working directory.
type Dealer ¶
Dealer is the responsible for creating and returning the reference to a workdir to use during mutation testing instead of the actual source code.
It has two methods:
Get that returns a folder name that will be used by Gremlins as workdir. Clean that must be called to remove all the created folders.