Consolidate all hashing to the common/hashing package

And remove now unsued hashing funcs.
This commit is contained in:
Bjørn Erik Pedersen
2024-07-30 15:47:34 +02:00
parent d5eda13cb2
commit e67886c038
125 changed files with 177 additions and 368 deletions

View File

@@ -18,8 +18,8 @@ import (
"fmt"
"reflect"
"github.com/gohugoio/hugo/common/hashing"
"github.com/gohugoio/hugo/common/types"
"github.com/gohugoio/hugo/identity"
)
var (
@@ -49,7 +49,7 @@ func normalize(v reflect.Value) any {
k := v.Kind()
switch {
case !v.Type().Comparable():
return identity.HashUint64(v.Interface())
return hashing.HashUint64(v.Interface())
case isNumber(k):
f, err := numberToFloat(v)
if err == nil {