Documentation
¶
Overview ¶
Package html 提供输出 HTML 内容的 mimetype.MarshalFunc 函数。
tpl := template.ParseFiles(...) mgr := html.New(tpl) mimetype.AddMarshal("text/html", mgr.Marshal) func handle(ctx *web.Context) { ctx.Render(200, html.Tpl("index", map[string]interface{}{...}), nil) }
Index ¶
Constants ¶
View Source
const Mimetype = "text/html"
Mimetype HTML 的 mimetype 值
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTML ¶
type HTML struct {
// contains filtered or unexported fields
}
HTML 模板管理
Click to show internal directories.
Click to hide internal directories.