all: Run gofumpt -l -w .

This commit is contained in:
Bjørn Erik Pedersen
2024-01-28 22:34:10 +01:00
parent 982d9513e7
commit a795acbcd8
77 changed files with 102 additions and 203 deletions

View File

@@ -41,8 +41,8 @@ Data: {{ len .Data }}|
IntegrationTestConfig{
T: t,
TxtarString: files,
//LogLevel: logg.LevelTrace,
//Verbose: true,
// LogLevel: logg.LevelTrace,
// Verbose: true,
},
).Build()

View File

@@ -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
}

View File

@@ -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"