mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-25 22:00:58 +02:00
@@ -20,6 +20,8 @@ import (
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/gohugoio/hugo/common/types"
|
||||
|
||||
"github.com/gohugoio/hugo/compare"
|
||||
)
|
||||
|
||||
@@ -88,7 +90,6 @@ func (*Namespace) Default(dflt interface{}, given ...interface{}) (interface{},
|
||||
|
||||
// Eq returns the boolean truth of arg1 == arg2.
|
||||
func (*Namespace) Eq(x, y interface{}) bool {
|
||||
|
||||
if e, ok := x.(compare.Eqer); ok {
|
||||
return e.Eq(y)
|
||||
}
|
||||
@@ -98,6 +99,9 @@ func (*Namespace) Eq(x, y interface{}) bool {
|
||||
}
|
||||
|
||||
normalize := func(v interface{}) interface{} {
|
||||
if types.IsNil(v) {
|
||||
return nil
|
||||
}
|
||||
vv := reflect.ValueOf(v)
|
||||
switch vv.Kind() {
|
||||
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
|
||||
|
Reference in New Issue
Block a user