Documentation
¶
Overview ¶
Package html 提供输出 HTML 内容的 content.MarshalFunc 函数
mt := content.NewContent()
tpl := template.ParseFiles(...)
mgr := html.New(tpl)
mt.Add("text/html", mgr.Marshal, nil)
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.