Documentation ¶ Index ¶ Variables func Init() func New(name string, dir string) *template.Template func NewFS(name string, fs embed.FS) *template.Template type Template func Render() *Template func (t *Template) Render(w io.Writer, name string, data interface{}, c echo.Context) error Constants ¶ This section is empty. Variables ¶ View Source var TplFs embed.FS View Source var Views = map[string]*template.Template{} Functions ¶ func Init ¶ func Init() func New ¶ func New(name string, dir string) *template.Template New 创建普通模板 func NewFS ¶ func NewFS(name string, fs embed.FS) *template.Template NewFS 创建虚拟模板 Types ¶ type Template ¶ type Template struct{} Template 模板引擎 func Render ¶ func Render() *Template func (*Template) Render ¶ func (t *Template) Render(w io.Writer, name string, data interface{}, c echo.Context) error Source Files ¶ View all Source files template.go Click to show internal directories. Click to hide internal directories.