通过文档中“修改默认的标识符”替换代码之后页面无响应
1. 运行环境
go version go1.18 windows/amd64
2. 问题描述?
使用文档中的
template.New("test").Delims("{[","]}").ParseFiles("resources/views/articles/create.gohtml")
替换教程中
template.ParseFiles("resources/views/articles/create.gohtml")
并修改了默认模板的{{}}
为{[]}
, 并且更新了模板, 重新运行之后不生效
3. 您期望得到的结果?
求正确的实现方式, 另外 template.New("test")
这里表达的意思没有看懂
推荐文章: