mirror of
https://github.com/IBM/fp-go.git
synced 2025-08-10 22:31:32 +02:00
fix: add more tests
Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
This commit is contained in:
15
cli/templates/functions.go
Normal file
15
cli/templates/functions.go
Normal file
@@ -0,0 +1,15 @@
|
||||
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))
|
||||
}
|
Reference in New Issue
Block a user