diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-12-02 13:23:25 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-12-03 13:12:58 +0100 |
commit | d90e37e0c6e812f9913bf256c9c81aa05b7a08aa (patch) | |
tree | 7b1b14464eefec1188ca2eed53c64e4823453cc9 /hugofs/rootmapping_fs_test.go | |
parent | 32471b57bde51c55a15dbf1db75d6e5f7232c347 (diff) | |
download | hugo-d90e37e0c6e812f9913bf256c9c81aa05b7a08aa.tar.gz hugo-d90e37e0c6e812f9913bf256c9c81aa05b7a08aa.zip |
all: Format code with gofumpt
See https://github.com/mvdan/gofumpt
Diffstat (limited to 'hugofs/rootmapping_fs_test.go')
-rw-r--r-- | hugofs/rootmapping_fs_test.go | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/hugofs/rootmapping_fs_test.go b/hugofs/rootmapping_fs_test.go index b2552431a..e5f68d7a9 100644 --- a/hugofs/rootmapping_fs_test.go +++ b/hugofs/rootmapping_fs_test.go @@ -138,7 +138,6 @@ func TestLanguageRootMapping(t *testing.T) { c.Assert(getDirnames("content", rfsSv), qt.DeepEquals, []string{"blog", "docs"}) c.Assert(getDirnames("content", rfs), qt.DeepEquals, []string{"blog", "docs"}) - } func TestRootMappingFsDirnames(t *testing.T) { @@ -166,7 +165,6 @@ func TestRootMappingFsDirnames(t *testing.T) { dirnames, err := root.Readdirnames(-1) c.Assert(err, qt.IsNil) c.Assert(dirnames, qt.DeepEquals, []string{"af3", "bf1", "cf2"}) - } func TestRootMappingFsFilename(t *testing.T) { @@ -208,29 +206,29 @@ func TestRootMappingFsMount(t *testing.T) { bfs := afero.NewBasePathFs(fs, "themes/a").(*afero.BasePathFs) rm := []RootMapping{ // Directories - RootMapping{ + { From: "content/blog", To: "mynoblogcontent", Meta: FileMeta{"lang": "no"}, }, - RootMapping{ + { From: "content/blog", To: "myenblogcontent", Meta: FileMeta{"lang": "en"}, }, - RootMapping{ + { From: "content/blog", To: "mysvblogcontent", Meta: FileMeta{"lang": "sv"}, }, // Files - RootMapping{ + { From: "content/singles/p1.md", To: "singlefiles/no.txt", ToBasedir: "singlefiles", Meta: FileMeta{"lang": "no"}, }, - RootMapping{ + { From: "content/singles/p1.md", To: "singlefiles/sv.txt", ToBasedir: "singlefiles", @@ -300,19 +298,19 @@ func TestRootMappingFsMountOverlap(t *testing.T) { c.Assert(afero.WriteFile(fs, filepath.FromSlash("de/e.txt"), []byte("some no content"), 0755), qt.IsNil) rm := []RootMapping{ - RootMapping{ + { From: "static", To: "da", }, - RootMapping{ + { From: "static/b", To: "db", }, - RootMapping{ + { From: "static/b/c", To: "dc", }, - RootMapping{ + { From: "/static/e/", To: "de", }, @@ -339,7 +337,6 @@ func TestRootMappingFsMountOverlap(t *testing.T) { fi, err := rfs.Stat(filepath.FromSlash("static/b/b.txt")) c.Assert(err, qt.IsNil) c.Assert(fi.Name(), qt.Equals, "b.txt") - } func TestRootMappingFsOs(t *testing.T) { @@ -485,5 +482,4 @@ func TestRootMappingFsOsBase(t *testing.T) { } c.Assert(getDirnames("static/a/b/c"), qt.DeepEquals, []string{"d4", "f-1.txt", "f-2.txt", "f-3.txt", "ms-1.txt"}) - } |