Documentation ¶
Overview ¶
视图管理.
Index ¶
- func ParseContent(content string, params Params) ([]byte, error)
- type FuncMap
- type Params
- type View
- func (view *View) AddPath(path string) error
- func (view *View) Assign(key string, value interface{})
- func (view *View) Assigns(data Params)
- func (view *View) BindFunc(name string, function interface{})
- func (view *View) Parse(file string, params Params, funcmap ...map[string]interface{}) ([]byte, error)
- func (view *View) ParseContent(content string, params Params, funcmap ...map[string]interface{}) ([]byte, error)
- func (view *View) SetDelimiters(left, right string)
- func (view *View) SetPath(path string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type View ¶
type View struct {
// contains filtered or unexported fields
}
视图对象
func (*View) Parse ¶
func (view *View) Parse(file string, params Params, funcmap ...map[string]interface{}) ([]byte, error)
解析模板,返回解析后的内容
Click to show internal directories.
Click to hide internal directories.