html模板
已收录文章:1篇
-
从字符串载入模板 我们可以定义模板字符串,然后载入并解析渲染: template.New(tplName string).Parse(tpl string) // 从字符串模板构建 tplStr := ` {{ .Name }} {{ .Age }} ` // if parse failed Must will render a panic er378 收藏