Documentation
¶
Overview ¶
Package fakeextractor provides a Extractor implementation to be used in tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AllowUnexported = cmp.AllowUnexported(fakeExtractor{})
AllowUnexported is a utility function to be used with cmp.Diff to compare structs that contain the fake extractor.
Functions ¶
func New ¶
func New(name string, version int, requiredFiles []string, pathToNamesErr map[string]NamesErr) filesystem.Extractor
New returns a fake fakeExtractor.
The fakeExtractor returns FileRequired(path) = true for any path in requiredFiles. The fakeExtractor returns the package and error from pathToNamesErr given the same path to Extract(...).
func NewDirExtractor ¶ added in v0.3.5
func NewDirExtractor(name string, version int, requiredFiles []string, pathToNamesErr map[string]NamesErr) filesystem.Extractor
NewDirExtractor returns a fake fakeExtractor designed for extracting directories.
The fakeExtractor returns FileRequired(path) = true for any path in requiredFiles. The fakeExtractor returns the package and error from pathToNamesErr given the same path to Extract(...).