1
0
mirror of https://github.com/IBM/fp-go.git synced 2025-08-10 22:31:32 +02:00
Files
fp-go/cli/templates/functions.go
Dr. Carsten Leue 598a7b261b fix: add more tests
Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
2024-05-24 23:19:24 +02:00

16 lines
282 B
Go

package templates
import (
"text/template"
E "github.com/IBM/fp-go/either"
)
var (
templateFunctions = template.FuncMap{}
)
func Parse(name, tmpl string) E.Either[error, *template.Template] {
return E.TryCatchError(template.New(name).Funcs(templateFunctions).Parse(tmpl))
}