Documentation
¶
Index ¶
- func A(text string, urlStr string, options ...map[string]any) string
- func ASafe(text, urlStr string, options ...map[string]any) string
- func AWithQuery(text string, baseUrl string, queryParams map[string]any, ...) string
- func Dict(values ...any) map[string]any
- func LoopInt(start, end int) []int
- type Engine
- type TplExt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func New ¶
New 创建模板引擎实例 fsys: 生产模式使用的 embed.FS fsysPath: 生产模式下的虚拟路径 localPath: 开发模式下的本地模板目录路径 devMode: 是否为开发模式
func (*Engine) RenderString ¶
RenderString 渲染模板为字符串
func (*Engine) SetLayoutDir ¶
SetLayoutDir 设置layout目录名称(如"layouts")
Click to show internal directories.
Click to hide internal directories.