aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl/templates/init.go
diff options
context:
space:
mode:
Diffstat (limited to 'tpl/templates/init.go')
-rw-r--r--tpl/templates/init.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/tpl/templates/init.go b/tpl/templates/init.go
index ff6acdabd..7bd1f50c5 100644
--- a/tpl/templates/init.go
+++ b/tpl/templates/init.go
@@ -39,6 +39,16 @@ func init() {
},
)
+ ns.AddMethodMapping(ctx.Defer,
+ nil, // No aliases to keep the AST parsing simple.
+ [][2]string{},
+ )
+
+ ns.AddMethodMapping(ctx.DoDefer,
+ []string{"doDefer"},
+ [][2]string{},
+ )
+
return ns
}