mirror of
https://github.com/gohugoio/hugo.git
synced 2025-09-01 22:42:45 +02:00
Consolidate all hashing to the common/hashing package
And remove now unsued hashing funcs.
This commit is contained in:
@@ -20,8 +20,8 @@ import (
|
||||
"strconv"
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/gohugoio/hugo/common/hashing"
|
||||
"github.com/gohugoio/hugo/deps"
|
||||
"github.com/gohugoio/hugo/helpers"
|
||||
"github.com/gohugoio/hugo/tpl"
|
||||
"github.com/mitchellh/mapstructure"
|
||||
)
|
||||
@@ -83,7 +83,7 @@ func (ns *Namespace) DoDefer(ctx context.Context, id string, optsv any) string {
|
||||
templateName := id
|
||||
var key string
|
||||
if opts.Key != "" {
|
||||
key = helpers.MD5String(opts.Key)
|
||||
key = hashing.MD5FromStringHexEncoded(opts.Key)
|
||||
} else {
|
||||
key = strconv.FormatUint(defferedIDCounter.Add(1), 10)
|
||||
}
|
||||
|
Reference in New Issue
Block a user