mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-28 22:19:59 +02:00
@@ -26,7 +26,7 @@ func init() {
|
||||
|
||||
ns := &internal.TemplateFuncsNamespace{
|
||||
Name: name,
|
||||
Context: func(args ...interface{}) (interface{}, error) { return ctx, nil },
|
||||
Context: func(args ...any) (any, error) { return ctx, nil },
|
||||
}
|
||||
|
||||
ns.AddMethodMapping(ctx.Unmarshal,
|
||||
|
@@ -54,7 +54,7 @@ func (ns *Namespace) Unmarshal(r resource.UnmarshableResource) (*kopenapi3.T, er
|
||||
return nil, errors.New("no Key set in Resource")
|
||||
}
|
||||
|
||||
v, err := ns.cache.GetOrCreate(key, func() (interface{}, error) {
|
||||
v, err := ns.cache.GetOrCreate(key, func() (any, error) {
|
||||
f := metadecoders.FormatFromMediaType(r.MediaType())
|
||||
if f == "" {
|
||||
return nil, errors.Errorf("MIME %q not supported", r.MediaType())
|
||||
|
Reference in New Issue
Block a user