summaryrefslogtreecommitdiffstats
path: root/tpl/tplimpl/template_funcs.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-04-30 22:52:47 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-05-01 15:13:41 +0200
commitb958c0c1091574d0bd8118045fdf421c7d946893 (patch)
tree1b03de756f284383f4e60a19b384ae3c8863a82a /tpl/tplimpl/template_funcs.go
parentfc77b6303c8aeda6362d7e2fc5d0fe52067c1a8d (diff)
tpl/os: 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.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/tpl/tplimpl/template_funcs.go b/tpl/tplimpl/template_funcs.go
index 0bc8f4590..8179d9cbf 100644
--- a/tpl/tplimpl/template_funcs.go
+++ b/tpl/tplimpl/template_funcs.go
@@ -33,6 +33,7 @@ import (
_ "github.com/spf13/hugo/tpl/inflect"
_ "github.com/spf13/hugo/tpl/lang"
_ "github.com/spf13/hugo/tpl/math"
+ _ "github.com/spf13/hugo/tpl/os"
_ "github.com/spf13/hugo/tpl/strings"
)
@@ -87,7 +88,6 @@ func (t *templateFuncster) partialCached(name string, context interface{}, varia
func (t *templateFuncster) initFuncMap() {
funcMap := template.FuncMap{
// Namespaces
- "os": t.os.Namespace,
"safe": t.safe.Namespace,
//"time": t.time.Namespace,
"transform": t.transform.Namespace,
@@ -97,7 +97,6 @@ func (t *templateFuncster) initFuncMap() {
"absLangURL": t.urls.AbsLangURL,
"dateFormat": t.time.Format,
"emojify": t.transform.Emojify,
- "getenv": t.os.Getenv,
"highlight": t.transform.Highlight,
"htmlEscape": t.transform.HTMLEscape,
"htmlUnescape": t.transform.HTMLUnescape,
@@ -110,8 +109,6 @@ func (t *templateFuncster) initFuncMap() {
"print": fmt.Sprint,
"printf": fmt.Sprintf,
"println": fmt.Sprintln,
- "readDir": t.os.ReadDir,
- "readFile": t.os.ReadFile,
"ref": t.urls.Ref,
"relURL": t.urls.RelURL,
"relLangURL": t.urls.RelLangURL,