20 lines
289 B
Go
20 lines
289 B
Go
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)
|
|
}
|
|
)
|