diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-05-01 18:40:34 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-05-01 21:44:15 +0200 |
commit | 690b0f8ff5795318dfa3834a5a75d6623e7d934a (patch) | |
tree | 1112306f4c6fecc0966d880dec702c3804633deb /tpl/images | |
parent | e2b067f0504ba41ef45786e2f83d7002bd13a7eb (diff) |
tpl: Add docshelper for template funcs
And fix some other minor related issues.
Updates #3418
Diffstat (limited to 'tpl/images')
-rw-r--r-- | tpl/images/init.go | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/tpl/images/init.go b/tpl/images/init.go index 0c2cb57c4..8e829f300 100644 --- a/tpl/images/init.go +++ b/tpl/images/init.go @@ -24,19 +24,18 @@ func init() { f := func(d *deps.Deps) *internal.TemplateFuncsNamespace { ctx := New(d) - examples := [][2]string{ - {}, - } - - return &internal.TemplateFuncsNamespace{ + ns := &internal.TemplateFuncsNamespace{ Name: name, Context: func() interface{} { return ctx }, - Aliases: map[string]interface{}{ - "imageConfig": ctx.Config, - }, - Examples: examples, } + ns.AddMethodMapping(ctx.Config, + []string{"imageConfig"}, + [][2]string{}, + ) + + return ns + } internal.AddTemplateFuncsNamespace(f) |