ensure sprig funcs are mapped for files
This commit is contained in:
parent
06da4ca080
commit
81fdd9a413
4
main.go
4
main.go
@ -266,13 +266,13 @@ func main() {
|
||||
tplFiles := expandFiles(flag.Args())
|
||||
// Otherwise use the provided tplFiles/directories for templates to render.
|
||||
// fmt.Fprintf(os.Stderr, "%+v\n", tplFiles)
|
||||
tpl, err = template.ParseFiles(tplFiles...)
|
||||
tpl, err = tpl.ParseFiles(tplFiles...)
|
||||
checkErr(err)
|
||||
for i, file := range tplFiles {
|
||||
if i > 0 {
|
||||
fmt.Println(flags.outputDelimiter)
|
||||
}
|
||||
checkErr(tpl.ExecuteTemplate(os.Stdout, filepath.Base(file), values))
|
||||
checkErr(tpl.Funcs(sprig.FuncMap()).ExecuteTemplate(os.Stdout, filepath.Base(file), values))
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user