Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-01-31 19:15:14 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-02-04 02:17:10 +0300
commit80dd6ddde27ce36f5432fb780e94d4974b5277c7 (patch)
tree99d0ba7eb2b343b4b65c4433a998d73af3182933 /hugofs/walk_test.go
parent299731012441378bb9c057ceb0a3c277108aaf01 (diff)
Fix module mount in sub folder
This addresses a specific issue, but is a also a major simplification of the filesystem file mounts. Fixes #6730
Diffstat (limited to 'hugofs/walk_test.go')
-rw-r--r--hugofs/walk_test.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/hugofs/walk_test.go b/hugofs/walk_test.go
index 4effa8000..0c08968c6 100644
--- a/hugofs/walk_test.go
+++ b/hugofs/walk_test.go
@@ -176,6 +176,27 @@ func collectFilenames(fs afero.Fs, base, root string) ([]string, error) {
}
+func collectFileinfos(fs afero.Fs, base, root string) ([]FileMetaInfo, error) {
+ var fis []FileMetaInfo
+
+ walkFn := func(path string, info FileMetaInfo, err error) error {
+ if err != nil {
+ return err
+ }
+
+ fis = append(fis, info)
+
+ return nil
+ }
+
+ w := NewWalkway(WalkwayConfig{Fs: fs, BasePath: base, Root: root, WalkFn: walkFn})
+
+ err := w.Walk()
+
+ return fis, err
+
+}
+
func BenchmarkWalk(b *testing.B) {
c := qt.New(b)
fs := NewBaseFileDecorator(afero.NewMemMapFs())