summaryrefslogtreecommitdiffstats
path: root/hugolib
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2024-01-28 22:34:10 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2024-01-28 23:14:09 +0100
commita795acbcd8b18aa4af384d5c03f30740361c8fcf (patch)
tree0dbf7b000681a738b892c5235daf52c63cda88b9 /hugolib
parent982d9513e71b3d48e20cfa38454a0e1215a8d963 (diff)
all: Run gofumpt -l -w .
Diffstat (limited to 'hugolib')
-rw-r--r--hugolib/404_test.go4
-rw-r--r--hugolib/config.go7
-rw-r--r--hugolib/language_test.go4
3 files changed, 6 insertions, 9 deletions
diff --git a/hugolib/404_test.go b/hugolib/404_test.go
index 3c6a06045..fef020905 100644
--- a/hugolib/404_test.go
+++ b/hugolib/404_test.go
@@ -41,8 +41,8 @@ Data: {{ len .Data }}|
IntegrationTestConfig{
T: t,
TxtarString: files,
- //LogLevel: logg.LevelTrace,
- //Verbose: true,
+ // LogLevel: logg.LevelTrace,
+ // Verbose: true,
},
).Build()
diff --git a/hugolib/config.go b/hugolib/config.go
index 70dd790fe..13167dafd 100644
--- a/hugolib/config.go
+++ b/hugolib/config.go
@@ -157,7 +157,7 @@ module github.com/bep/mymod
tempDir := os.TempDir()
cacheDir := filepath.Join(tempDir, "hugocache")
- if err := os.MkdirAll(cacheDir, 0777); err != nil {
+ if err := os.MkdirAll(cacheDir, 0o777); err != nil {
return nil, err
}
cfg.Set("cacheDir", cacheDir)
@@ -168,11 +168,11 @@ module github.com/bep/mymod
fs := afero.NewOsFs()
- if err := afero.WriteFile(fs, filepath.Join(tempDir, "hugo.toml"), []byte(configToml), 0644); err != nil {
+ if err := afero.WriteFile(fs, filepath.Join(tempDir, "hugo.toml"), []byte(configToml), 0o644); err != nil {
return nil, err
}
- if err := afero.WriteFile(fs, filepath.Join(tempDir, "go.mod"), []byte(goMod), 0644); err != nil {
+ if err := afero.WriteFile(fs, filepath.Join(tempDir, "go.mod"), []byte(goMod), 0o644); err != nil {
return nil, err
}
@@ -181,5 +181,4 @@ module github.com/bep/mymod
return nil, err
}
return conf.Base, err
-
}
diff --git a/hugolib/language_test.go b/hugolib/language_test.go
index 74f80a29d..c9368770e 100644
--- a/hugolib/language_test.go
+++ b/hugolib/language_test.go
@@ -26,7 +26,7 @@ import (
func TestI18n(t *testing.T) {
c := qt.New(t)
- //https://github.com/gohugoio/hugo/issues/7804
+ // https://github.com/gohugoio/hugo/issues/7804
c.Run("pt-br should be case insensitive", func(c *qt.C) {
b := newTestSitesBuilder(c)
langCode := func() string {
@@ -76,12 +76,10 @@ name = "foo-a"
menus := b.H.Sites[0].Menus()
c.Assert(menus, qt.HasLen, 1)
-
})
}
func TestLanguageNumberFormatting(t *testing.T) {
-
b := newTestSitesBuilder(t)
b.WithConfigFile("toml", `
baseURL = "https://example.org"