tpl/safe: Make it a package that stands on its own

See #3042
This commit is contained in:
Bjørn Erik Pedersen
2017-04-30 23:06:28 +02:00
parent b958c0c109
commit 4a3463463f
4 changed files with 55 additions and 22 deletions

View File

@@ -21,7 +21,6 @@ import (
bp "github.com/spf13/hugo/bufferpool"
"github.com/spf13/hugo/deps"
"github.com/spf13/hugo/tpl/safe"
"github.com/spf13/hugo/tpl/time"
"github.com/spf13/hugo/tpl/transform"
"github.com/spf13/hugo/tpl/urls"
@@ -33,7 +32,6 @@ type templateFuncster struct {
cachedPartials partialCache
// Namespaces
safe *safe.Namespace
time *time.Namespace
transform *transform.Namespace
urls *urls.Namespace
@@ -47,7 +45,6 @@ func newTemplateFuncster(deps *deps.Deps) *templateFuncster {
cachedPartials: partialCache{p: make(map[string]interface{})},
// Namespaces
safe: safe.New(),
time: time.New(),
transform: transform.New(deps),
urls: urls.New(deps),