diff options
Diffstat (limited to 'tpl/internal/go_templates/htmltemplate/content.go')
-rw-r--r-- | tpl/internal/go_templates/htmltemplate/content.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tpl/internal/go_templates/htmltemplate/content.go b/tpl/internal/go_templates/htmltemplate/content.go index 9c61cfac0..d19b1ec12 100644 --- a/tpl/internal/go_templates/htmltemplate/content.go +++ b/tpl/internal/go_templates/htmltemplate/content.go @@ -29,7 +29,6 @@ const ( // indirect returns the value, after dereferencing as many times // as necessary to reach the base type (or nil). -// Signature modified by Hugo. TODO(bep) script this. func doIndirect(a any) any { if a == nil { return nil @@ -46,8 +45,8 @@ func doIndirect(a any) any { } var ( - errorType = reflect.TypeOf((*error)(nil)).Elem() - fmtStringerType = reflect.TypeOf((*fmt.Stringer)(nil)).Elem() + errorType = reflect.TypeFor[error]() + fmtStringerType = reflect.TypeFor[fmt.Stringer]() ) // indirectToStringerOrError returns the value, after dereferencing as many times |