v1.15.0
ADDED: * tplx, for one-shotting/shortcutting templating
This commit is contained in:
19
tplx/types.go
Normal file
19
tplx/types.go
Normal 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)
|
||||
}
|
||||
)
|
||||
Reference in New Issue
Block a user