New ๐ŸŒŠ wave for @helm

Commit d871a9f0

d871a9f007b0Merged

Roman Mironov <[email protected]> ยท 4 years ago ยท 1 file ยท ~1 modified

Description

feat: add custom funcs to gomplate

Details

Commit
d871a9f007b0
Parent
e4608cf45588

pkg/template/gomplate.gomodifiedView file

@@ -34,7 +34,13 @@
3434 }
3535
3636 func (t gomplateTemplater) funcMap() template.FuncMap {
37+ funcMap := template.FuncMap{}
38+
3739 log.Debug("Loading gomplate template functions")
40+ gomplateFuncMap := gomplate.CreateFuncs(context.Background(), &gomplateData.Data{})
41+
42+ addToMap(funcMap, gomplateFuncMap)
43+ addToMap(funcMap, customFuncs)
3844
39- return gomplate.CreateFuncs(context.Background(), &gomplateData.Data{})
45+ return funcMap
4046 }