Documentation ¶
Overview ¶
Package filebuilder provides a simple API for declaratively creating files and directories. Useful for mocking the file system during testing for CLI apps.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CleanFunc ¶
type CleanFunc func() error
CleanFunc removes the files created.
type Diff ¶
type Diff struct {
// contains filtered or unexported fields
}
Diff is used to record and compute the differences between two sets of file paths. Generally speaking any two string slices can be used, however this object is designed specifically for lists of file paths.
func CompareDirectories ¶
CompareDirectories creates a diff of any differences found. If the directories are not comparable, ok == false. If the directories are comparable, ok == true.
func (*Diff) Diff ¶
Diff returns a map containing the contents of each list that is not in the other.
type Entries ¶
type Entries []Entry
Entries represents a list of entries. This wrapper allows []Entry to satisfy the Entry interface.