diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2023-02-25 09:24:59 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2023-02-25 19:53:18 +0100 |
commit | ce524d0b5ebaef05d29fa368465f31358f26dcda (patch) | |
tree | e5df54a5deeefacbff4916d3619f85c2cb341b01 /tpl/path/init.go | |
parent | 2662faf61ff0240be1ee0d6c496b6b4a6ed55fb4 (diff) |
Add a page template func
Fixes #9339
Diffstat (limited to 'tpl/path/init.go')
-rw-r--r-- | tpl/path/init.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tpl/path/init.go b/tpl/path/init.go index 0d81f6181..97a479d3f 100644 --- a/tpl/path/init.go +++ b/tpl/path/init.go @@ -14,6 +14,7 @@ package path import ( + "context" "fmt" "path/filepath" @@ -29,7 +30,7 @@ func init() { ns := &internal.TemplateFuncsNamespace{ Name: name, - Context: func(args ...any) (any, error) { return ctx, nil }, + Context: func(cctx context.Context, args ...any) (any, error) { return ctx, nil }, } ns.AddMethodMapping(ctx.Split, |