summaryrefslogtreecommitdiffstats
path: root/tpl/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'tpl/crypto')
-rw-r--r--tpl/crypto/init.go2
-rw-r--r--tpl/crypto/init_test.go4
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{})
}