mirror of
https://github.com/gohugoio/hugo.git
synced 2025-09-01 22:42:45 +02:00
all: Run modernize -fix ./...
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user