summaryrefslogtreecommitdiffstats
path: root/tpl/os
diff options
context:
space:
mode:
Diffstat (limited to 'tpl/os')
-rw-r--r--tpl/os/init.go2
-rw-r--r--tpl/os/init_test.go4
2 files changed, 4 insertions, 2 deletions
diff --git a/tpl/os/init.go b/tpl/os/init.go
index 9d9b75473..c25d63d56 100644
--- a/tpl/os/init.go
+++ b/tpl/os/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.Getenv,
diff --git a/tpl/os/init_test.go b/tpl/os/init_test.go
index 6a91c743a..5d756bab2 100644
--- a/tpl/os/init_test.go
+++ b/tpl/os/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{})
}