ADDED:
* tplx, for one-shotting/shortcutting templating
This commit is contained in:
brent saner
2025-12-23 17:26:50 -05:00
parent 145c32268e
commit 006cf39fa1
7 changed files with 377 additions and 0 deletions

19
tplx/types.go Normal file
View File

@@ -0,0 +1,19 @@
package tplx
import (
htmlTpl `html/template`
`io`
txtTpl `text/template`
)
type (
tplType uint8
)
type (
Template interface {
*txtTpl.Template | *htmlTpl.Template
Execute(w io.Writer, obj any) (err error)
ExecuteTemplate(w io.Writer, tplNm string, obj any) (err error)
}
)