diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-04-30 22:19:49 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-05-01 15:13:41 +0200 |
commit | 744dccbea4a0dfecea4777a7f0d3bba99c2a9adb (patch) | |
tree | bf83b5b09314882e2bd66a8c07a0dc8c5e0f32db /tpl/tplimpl/template_funcs.go | |
parent | 8a49c0b3b8b5a374a64b639f46806192cd663fc9 (diff) |
tpl/crypto: Make it a package that stands on its own
See #3042
Diffstat (limited to 'tpl/tplimpl/template_funcs.go')
-rw-r--r-- | tpl/tplimpl/template_funcs.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tpl/tplimpl/template_funcs.go b/tpl/tplimpl/template_funcs.go index eb266bc0c..5adfff212 100644 --- a/tpl/tplimpl/template_funcs.go +++ b/tpl/tplimpl/template_funcs.go @@ -26,6 +26,7 @@ import ( // Init the namespaces _ "github.com/spf13/hugo/tpl/collections" _ "github.com/spf13/hugo/tpl/compare" + _ "github.com/spf13/hugo/tpl/crypto" _ "github.com/spf13/hugo/tpl/data" _ "github.com/spf13/hugo/tpl/lang" _ "github.com/spf13/hugo/tpl/math" @@ -83,7 +84,6 @@ func (t *templateFuncster) partialCached(name string, context interface{}, varia func (t *templateFuncster) initFuncMap() { funcMap := template.FuncMap{ // Namespaces - "crypto": t.crypto.Namespace, "encoding": t.encoding.Namespace, "images": t.images.Namespace, "inflect": t.inflect.Namespace, @@ -108,7 +108,6 @@ func (t *templateFuncster) initFuncMap() { "int": func(v interface{}) (int, error) { return cast.ToIntE(v) }, "jsonify": t.encoding.Jsonify, "markdownify": t.transform.Markdownify, - "md5": t.crypto.MD5, "now": t.time.Now, "partial": t.partial, "partialCached": t.partialCached, @@ -131,8 +130,6 @@ func (t *templateFuncster) initFuncMap() { "safeURL": t.safe.URL, "sanitizeURL": t.safe.SanitizeURL, "sanitizeurl": t.safe.SanitizeURL, - "sha1": t.crypto.SHA1, - "sha256": t.crypto.SHA256, "singularize": t.inflect.Singularize, "string": func(v interface{}) (string, error) { return cast.ToStringE(v) }, "time": t.time.AsTime, |