Upgrade to Go 1.24

Fixes #13381
This commit is contained in:
Bjørn Erik Pedersen
2025-02-12 10:35:51 +01:00
parent 9b5f786df8
commit fd8b0fbf8a
37 changed files with 652 additions and 566 deletions

View File

@@ -6,6 +6,7 @@ package template
import (
"github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/parse"
"maps"
"reflect"
"sync"
)
@@ -102,12 +103,8 @@ func (t *Template) Clone() (*Template, error) {
}
t.muFuncs.RLock()
defer t.muFuncs.RUnlock()
for k, v := range t.parseFuncs {
nt.parseFuncs[k] = v
}
for k, v := range t.execFuncs {
nt.execFuncs[k] = v
}
maps.Copy(nt.parseFuncs, t.parseFuncs)
maps.Copy(nt.execFuncs, t.execFuncs)
return nt, nil
}