mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-18 21:11:19 +02:00
Consolidate all hashing to the common/hashing package
And remove now unsued hashing funcs.
This commit is contained in:
@@ -22,11 +22,11 @@ import (
|
||||
"github.com/gohugoio/hugo/resources"
|
||||
"github.com/gohugoio/hugo/resources/resource"
|
||||
|
||||
"github.com/gohugoio/hugo/common/hashing"
|
||||
"github.com/gohugoio/hugo/common/types"
|
||||
|
||||
"github.com/mitchellh/mapstructure"
|
||||
|
||||
"github.com/gohugoio/hugo/helpers"
|
||||
"github.com/gohugoio/hugo/parser/metadecoders"
|
||||
|
||||
"github.com/spf13/cast"
|
||||
@@ -117,7 +117,7 @@ func (ns *Namespace) Unmarshal(args ...any) (any, error) {
|
||||
return nil, errors.New("no data to transform")
|
||||
}
|
||||
|
||||
key := helpers.MD5String(dataStr)
|
||||
key := hashing.MD5FromStringHexEncoded(dataStr)
|
||||
|
||||
v, err := ns.cache.GetOrCreate(key, func(string) (*resources.StaleValue[any], error) {
|
||||
f := decoder.FormatFromContentString(dataStr)
|
||||
|
Reference in New Issue
Block a user