update... work pending
This commit is contained in:
20
tplCmd/funcs.go
Normal file
20
tplCmd/funcs.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package tplCmd
|
||||
|
||||
import (
|
||||
`text/template`
|
||||
|
||||
`github.com/Masterminds/sprig/v3`
|
||||
)
|
||||
|
||||
// GetTpl returns a generic text/template.Template with the customization/FuncMap logic applied.
|
||||
func GetTpl() (tpl *template.Template) {
|
||||
|
||||
tpl = template.New("")
|
||||
|
||||
tpl.Funcs(sprig.TxtFuncMap()).Funcs(TplFuncs)
|
||||
if CombinedTplFuncMap != nil && len(CombinedTplFuncMap) > 0 {
|
||||
tpl.Funcs(CombinedTplFuncMap)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user