all: Run modernize -fix ./...

This commit is contained in:
Bjørn Erik Pedersen
2025-02-26 10:15:04 +01:00
parent b7ae24b9c2
commit 521911a576
141 changed files with 302 additions and 354 deletions

View File

@@ -24,6 +24,7 @@ import (
"github.com/gohugoio/hugo/common/paths"
"github.com/gohugoio/hugo/hugofs/glob"
"github.com/spf13/cast"
"slices"
)
var _ ResourceFinder = (*Resources)(nil)
@@ -222,7 +223,7 @@ type translatedResource interface {
// MergeByLanguage adds missing translations in r1 from r2.
func (r Resources) MergeByLanguage(r2 Resources) Resources {
result := append(Resources(nil), r...)
result := slices.Clone(r)
m := make(map[string]bool)
for _, rr := range r {
if translated, ok := rr.(translatedResource); ok {