Go1.8 html/template 一个行为的变化

Coldstar · · 902 次点击 · · 开始浏览    
这是一个创建于 的文章,其中的信息可能已经有所发展或是发生改变。

在Go1.8的开发过程中有一个提交,标题是:

html/template, text/template: clarify template redefinition behavior

描述是:

Make two important points clearer:

 - Giving a template definition containing
   nothing but spaces has no effect.
 - Giving a template definition containing
   non-spaces can only be done once per template.

Fixes #16912.
Fixes #16913.
Fixes #17360.

看起来没什么特别的,但是如果你使用了一些基于Go template包的模板解析,升级到Go1.8之后可能会遇到模板热编译不能工作了,不要问我是怎么知道的


有疑问加站长微信联系(非本文作者)

本文来自:Segmentfault

感谢作者:Coldstar

查看原文:Go1.8 html/template 一个行为的变化

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

902 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传