mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
@@ -32,7 +32,7 @@ import (
|
||||
// We deviate from the stdlib due to https://github.com/golang/go/issues/14751.
|
||||
//
|
||||
// TODO(moorereason): merge upstream changes.
|
||||
func (ns *Namespace) Index(item interface{}, args ...interface{}) (interface{}, error) {
|
||||
func (ns *Namespace) Index(item any, args ...any) (any, error) {
|
||||
v := reflect.ValueOf(item)
|
||||
if !v.IsValid() {
|
||||
return nil, errors.New("index of untyped nil")
|
||||
@@ -43,7 +43,7 @@ func (ns *Namespace) Index(item interface{}, args ...interface{}) (interface{},
|
||||
return lowerm.Get(cast.ToStringSlice(args)...), nil
|
||||
}
|
||||
|
||||
var indices []interface{}
|
||||
var indices []any
|
||||
|
||||
if len(args) == 1 {
|
||||
v := reflect.ValueOf(args[0])
|
||||
|
Reference in New Issue
Block a user