summaryrefslogtreecommitdiffstats
path: root/modules/client_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 /modules/client_test.go
parent32471b57bde51c55a15dbf1db75d6e5f7232c347 (diff)
all: Format code with gofumpt
See https://github.com/mvdan/gofumpt
Diffstat (limited to 'modules/client_test.go')
-rw-r--r--modules/client_test.go9
1 files changed, 1 insertions, 8 deletions
diff --git a/modules/client_test.go b/modules/client_test.go
index 7cc1058fc..c7a07fb87 100644
--- a/modules/client_test.go
+++ b/modules/client_test.go
@@ -30,7 +30,6 @@ import (
)
func TestClient(t *testing.T) {
-
modName := "hugo-modules-basic-test"
modPath := "github.com/gohugoio/tests/" + modName
expect := `github.com/gohugoio/tests/hugo-modules-basic-test github.com/gohugoio/hugoTestModules1_darwin/modh2_2@v1.4.0
@@ -41,7 +40,6 @@ github.com/gohugoio/hugoTestModules1_darwin/modh2_2@v1.4.0 github.com/gohugoio/h
c := qt.New(t)
newClient := func(c *qt.C, withConfig func(cfg *ClientConfig)) (*Client, func()) {
-
workingDir, clean, err := htesting.CreateTempDir(hugofs.Os, modName)
c.Assert(err, qt.IsNil)
themesDir := filepath.Join(workingDir, "themes")
@@ -55,7 +53,7 @@ github.com/gohugoio/hugoTestModules1_darwin/modh2_2@v1.4.0 github.com/gohugoio/h
}
withConfig(&ccfg)
- ccfg.ModuleConfig.Imports = []Import{Import{Path: "github.com/gohugoio/hugoTestModules1_darwin/modh2_2"}}
+ ccfg.ModuleConfig.Imports = []Import{{Path: "github.com/gohugoio/hugoTestModules1_darwin/modh2_2"}}
client := NewClient(ccfg)
return client, clean
@@ -98,7 +96,6 @@ project github.com/gohugoio/hugoTestModules1_darwin/modh2_2_2@v1.3.0+vendor
// Test Tidy
c.Assert(client.Tidy(), qt.IsNil)
-
})
c.Run("IgnoreVendor", func(c *qt.C) {
@@ -165,15 +162,12 @@ project github.com/gohugoio/hugoTestModules1_darwin/modh2_2_2@v1.3.0+vendor
dirname, err = client.createThemeDirname(absDir, false)
fmt.Println(dirname)
c.Assert(err, qt.Not(qt.IsNil))
-
})
-
}
var globAll, _ = glob.GetGlob("**")
func TestGetModlineSplitter(t *testing.T) {
-
c := qt.New(t)
gomodSplitter := getModlineSplitter(true)
@@ -184,5 +178,4 @@ func TestGetModlineSplitter(t *testing.T) {
gosumSplitter := getModlineSplitter(false)
c.Assert(gosumSplitter("github.com/BurntSushi/toml v0.3.1"), qt.DeepEquals, []string{"github.com/BurntSushi/toml", "v0.3.1"})
-
}