mirror of
https://github.com/ivuorinen/gibidify.git
synced 2026-03-20 15:03:08 +00:00
Initial commit
This commit is contained in:
16
fileproc/fake_walker.go
Normal file
16
fileproc/fake_walker.go
Normal file
@@ -0,0 +1,16 @@
|
||||
// Package fileproc provides functions for file processing.
|
||||
package fileproc
|
||||
|
||||
// FakeWalker implements Walker for testing purposes.
|
||||
type FakeWalker struct {
|
||||
Files []string
|
||||
Err error
|
||||
}
|
||||
|
||||
// Walk returns predetermined file paths or an error, depending on FakeWalker's configuration.
|
||||
func (fw FakeWalker) Walk(root string) ([]string, error) {
|
||||
if fw.Err != nil {
|
||||
return nil, fw.Err
|
||||
}
|
||||
return fw.Files, nil
|
||||
}
|
||||
Reference in New Issue
Block a user