mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
all: Run modernize -fix ./...
This commit is contained in:
@@ -36,6 +36,7 @@ import (
|
||||
"github.com/spf13/cast"
|
||||
|
||||
"github.com/gohugoio/hugo/deps"
|
||||
"slices"
|
||||
)
|
||||
|
||||
// New returns a new instance of the data-namespaced template functions.
|
||||
@@ -170,12 +171,7 @@ func hasHeaderValue(m http.Header, key, value string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
for _, v := range s {
|
||||
if v == value {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
return slices.Contains(s, value)
|
||||
}
|
||||
|
||||
func hasHeaderKey(m http.Header, key string) bool {
|
||||
|
@@ -155,11 +155,11 @@ func TestScpGetRemoteParallel(t *testing.T) {
|
||||
|
||||
var wg sync.WaitGroup
|
||||
|
||||
for i := 0; i < 1; i++ {
|
||||
for i := range 1 {
|
||||
wg.Add(1)
|
||||
go func(gor int) {
|
||||
defer wg.Done()
|
||||
for j := 0; j < 10; j++ {
|
||||
for range 10 {
|
||||
var cb []byte
|
||||
f := func(b []byte) (bool, error) {
|
||||
cb = b
|
||||
|
Reference in New Issue
Block a user