First off, thanks for creating gucci. I come to rely on it a few times; it's simple and efficient!
I have another project, where I wanted to include gucci because I liked how you included sprig, etc. and the API seems sane. Therefor, I extracted some functions to be able to use gucci as a library.
This is an example:
// i have a replace in go.mod
import (
github.com/noqcks/gucci/gucci
)
tmpl, _ := gucci.LoadTemplateFile(fileTemplate)
writer, _ := os.Create(fileRendered)
err := gucci.ExecuteTemplate(gucci.Env(), writer, tmpl)
if err {
// etc.
}
I can also merge/override variables, etc.. But this is to show you what I want to achieve.
TL;DR it seems to work, do you have any thoughts on including this?
Hey!
First off, thanks for creating gucci. I come to rely on it a few times; it's simple and efficient!
I have another project, where I wanted to include gucci because I liked how you included sprig, etc. and the API seems sane. Therefor, I extracted some functions to be able to use gucci as a library.
This is an example:
I can also merge/override variables, etc.. But this is to show you what I want to achieve.
TL;DR it seems to work, do you have any thoughts on including this?
Thanks, Till