diff options
author | Bjørn Erik Pedersen <[email protected]> | 2024-07-30 15:47:34 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2024-07-31 16:44:06 +0200 |
commit | e67886c038dc79755c14ec77bbeff6605953f9ef (patch) | |
tree | 6b36585a55796b5a29d41764175e4d6d82a0d206 /tpl/templates | |
parent | d5eda13cb2e57998210b66e080dc96e95b38e5f0 (diff) | |
download | hugo-e67886c038dc79755c14ec77bbeff6605953f9ef.tar.gz hugo-e67886c038dc79755c14ec77bbeff6605953f9ef.zip |
Consolidate all hashing to the common/hashing package
And remove now unsued hashing funcs.
Diffstat (limited to 'tpl/templates')
-rw-r--r-- | tpl/templates/templates.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tpl/templates/templates.go b/tpl/templates/templates.go index 91e96ed8e..98b4b4c38 100644 --- a/tpl/templates/templates.go +++ b/tpl/templates/templates.go @@ -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) } |