diff options
Diffstat (limited to 'tpl/compare')
-rw-r--r-- | tpl/compare/init.go | 2 | ||||
-rw-r--r-- | tpl/compare/init_test.go | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/tpl/compare/init.go b/tpl/compare/init.go index f96e382e5..9aa533f55 100644 --- a/tpl/compare/init.go +++ b/tpl/compare/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.Default, diff --git a/tpl/compare/init_test.go b/tpl/compare/init_test.go index 29a525f93..8698cb5e3 100644 --- a/tpl/compare/init_test.go +++ b/tpl/compare/init_test.go @@ -36,5 +36,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{}) } |