summaryrefslogtreecommitdiffstats
path: root/hugofs/walk_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-12-02 13:23:25 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-12-03 13:12:58 +0100
commitd90e37e0c6e812f9913bf256c9c81aa05b7a08aa (patch)
tree7b1b14464eefec1188ca2eed53c64e4823453cc9 /hugofs/walk_test.go
parent32471b57bde51c55a15dbf1db75d6e5f7232c347 (diff)
all: Format code with gofumpt
See https://github.com/mvdan/gofumpt
Diffstat (limited to 'hugofs/walk_test.go')
-rw-r--r--hugofs/walk_test.go11
1 files changed, 3 insertions, 8 deletions
diff --git a/hugofs/walk_test.go b/hugofs/walk_test.go
index c38c6044f..d5ae33a34 100644
--- a/hugofs/walk_test.go
+++ b/hugofs/walk_test.go
@@ -56,16 +56,16 @@ func TestWalkRootMappingFs(t *testing.T) {
c.Assert(afero.WriteFile(fs, filepath.Join("e/f", testfile), []byte("some content"), 0755), qt.IsNil)
rm := []RootMapping{
- RootMapping{
+ {
From: "static/b",
To: "e/f",
},
- RootMapping{
+ {
From: "static/a",
To: "c/d",
},
- RootMapping{
+ {
From: "static/c",
To: "a/b",
},
@@ -79,7 +79,6 @@ func TestWalkRootMappingFs(t *testing.T) {
c.Assert(err, qt.IsNil)
c.Assert(names, qt.DeepEquals, []string{"a/test.txt", "b/test.txt", "c/test.txt"})
-
}
func skipSymlink() bool {
@@ -137,7 +136,6 @@ func TestWalkSymbolicLink(t *testing.T) {
// Note: the docsreal folder is considered cyclic when walking from the root, but this works.
c.Assert(names, qt.DeepEquals, []string{"b.txt", "docsreal/sub/a.txt"})
})
-
}
func collectFilenames(fs afero.Fs, base, root string) ([]string, error) {
@@ -165,7 +163,6 @@ func collectFilenames(fs afero.Fs, base, root string) ([]string, error) {
err := w.Walk()
return names, err
-
}
func collectFileinfos(fs afero.Fs, base, root string) ([]FileMetaInfo, error) {
@@ -186,7 +183,6 @@ func collectFileinfos(fs afero.Fs, base, root string) ([]FileMetaInfo, error) {
err := w.Walk()
return fis, err
-
}
func BenchmarkWalk(b *testing.B) {
@@ -234,5 +230,4 @@ func BenchmarkWalk(b *testing.B) {
b.Fatal(err)
}
}
-
}