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

@@ -22,6 +22,7 @@ import (
"strings"
"github.com/gohugoio/hugo/common/hstrings"
"slices"
)
type colorGoProvider interface {
@@ -91,11 +92,8 @@ func (c Color) toSRGB(i uint8) float64 {
// that the palette is valid for the relevant format.
func AddColorToPalette(c color.Color, p color.Palette) color.Palette {
var found bool
for _, cc := range p {
if c == cc {
found = true
break
}
if slices.Contains(p, c) {
found = true
}
if !found {