diff options
Diffstat (limited to 'tpl/crypto')
-rw-r--r-- | tpl/crypto/init.go | 2 | ||||
-rw-r--r-- | tpl/crypto/init_test.go | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/tpl/crypto/init.go b/tpl/crypto/init.go index 2c6e94298..5ce2a4b5e 100644 --- a/tpl/crypto/init.go +++ b/tpl/crypto/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.MD5, diff --git a/tpl/crypto/init_test.go b/tpl/crypto/init_test.go index 120e1e4e7..1c200d777 100644 --- a/tpl/crypto/init_test.go +++ b/tpl/crypto/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{}) } |