diff options
Diffstat (limited to 'tpl/safe')
-rw-r--r-- | tpl/safe/init.go | 2 | ||||
-rw-r--r-- | tpl/safe/init_test.go | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/tpl/safe/init.go b/tpl/safe/init.go index becaf38f3..9fbae4044 100644 --- a/tpl/safe/init.go +++ b/tpl/safe/init.go @@ -26,7 +26,7 @@ func init() { ns := &internal.TemplateFuncsNamespace{ Name: name, - Context: func(args ...interface{}) interface{} { return ctx }, + Context: func(args ...interface{}) (interface{}, error) { return ctx, nil }, } ns.AddMethodMapping(ctx.CSS, diff --git a/tpl/safe/init_test.go b/tpl/safe/init_test.go index 2ed7b1872..7aa1473d2 100644 --- a/tpl/safe/init_test.go +++ b/tpl/safe/init_test.go @@ -37,5 +37,7 @@ func TestInit(t *testing.T) { } c.Assert(found, qt.Equals, true) - c.Assert(ns.Context(), hqt.IsSameType, &Namespace{}) + ctx, err := ns.Context() + c.Assert(err, qt.IsNil) + c.Assert(ctx, hqt.IsSameType, &Namespace{}) } |