render:Go包,用于轻松呈现JSON,XML,二进制数据和HTML模板响应-源码

上传者: 42151305 | 上传时间: 2021-02-02 16:35:10 | 文件大小: 29KB | 文件类型: ZIP
渲染 Render是一个软件包,提供了轻松呈现JSON,XML,文本,二进制数据和HTML模板的功能。 该程序包基于工作。 区块弃用通知 Go 1.6引入了一个新的动作。 这与Render包含的block模板功能冲突。 为了提供简单的迁移路径,创建了一个名为partial的新功能。 它是旧block函数的副本。 建议该block函数的所有用户更新其代码,以避免将来出现任何问题。 在Go 1.6之前的版本中,Render的block功能将继续起作用,但是将记录一条消息,敦促您迁移到新的partial功能。 用法 只要您可以从处理程序访问http.ResponseWriter ,Render几乎可以与任何Web框架一起使用。 渲染功能只是包装了Go的现有功能,用于封送和渲染数据。 HTML:使用包呈现HTML模板。 JSON:使用包将数据送为JSON编码的响应。 XML:使用包将数据封送为XML编码的响应。 二进制数据:将传入数据直接传递到http.ResponseWriter 。 文本:将传入的字符串直接传递到http.ResponseWriter 。 // main.go

文件下载

资源详情

[{"title":"( 43 个子文件 29KB ) render:Go包,用于轻松呈现JSON,XML,二进制数据和HTML模板响应-源码","children":[{"title":"render-master","children":[{"title":"render_json_test.go <span style='color:#111;'> 7.01KB </span>","children":null,"spread":false},{"title":"helpers.go <span style='color:#111;'> 429B </span>","children":null,"spread":false},{"title":".gitignore <span style='color:#111;'> 277B </span>","children":null,"spread":false},{"title":"go.mod <span style='color:#111;'> 110B </span>","children":null,"spread":false},{"title":"render_html_test.go <span style='color:#111;'> 9.74KB </span>","children":null,"spread":false},{"title":"doc.go <span style='color:#111;'> 1.78KB </span>","children":null,"spread":false},{"title":"helpers_test.go <span style='color:#111;'> 1.84KB </span>","children":null,"spread":false},{"title":"render_data_test.go <span style='color:#111;'> 1.61KB </span>","children":null,"spread":false},{"title":"LICENSE <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"buffer.go <span style='color:#111;'> 1.07KB </span>","children":null,"spread":false},{"title":"go.sum <span style='color:#111;'> 219B </span>","children":null,"spread":false},{"title":".github","children":[{"title":"workflows","children":[{"title":"test.yaml <span style='color:#111;'> 503B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"README.md <span style='color:#111;'> 16.39KB </span>","children":null,"spread":false},{"title":"helpers_pre16_test.go <span style='color:#111;'> 1.83KB </span>","children":null,"spread":false},{"title":"render_xml_test.go <span style='color:#111;'> 3.45KB </span>","children":null,"spread":false},{"title":"render_jsonp_test.go <span style='color:#111;'> 2.79KB </span>","children":null,"spread":false},{"title":"render_text_test.go <span style='color:#111;'> 2.57KB </span>","children":null,"spread":false},{"title":"fs.go <span style='color:#111;'> 431B </span>","children":null,"spread":false},{"title":"render_test.go <span style='color:#111;'> 1.24KB </span>","children":null,"spread":false},{"title":"engine.go <span style='color:#111;'> 3.93KB </span>","children":null,"spread":false},{"title":"helpers_pre16.go <span style='color:#111;'> 691B </span>","children":null,"spread":false},{"title":"fixtures","children":[{"title":"custom_funcs","children":[{"title":"index.tmpl <span style='color:#111;'> 19B </span>","children":null,"spread":false}],"spread":false},{"title":"amber","children":[{"title":"example.amber <span style='color:#111;'> 139B </span>","children":null,"spread":false},{"title":"layouts","children":[{"title":"base.amber <span style='color:#111;'> 205B </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"blocks","children":[{"title":"content-partial.tmpl <span style='color:#111;'> 55B </span>","children":null,"spread":false},{"title":"content.tmpl <span style='color:#111;'> 96B </span>","children":null,"spread":false},{"title":"layout.tmpl <span style='color:#111;'> 57B </span>","children":null,"spread":false}],"spread":false},{"title":"template-dir-test","children":[{"title":"dedicated.tmpl","children":[{"title":"notbad.tmpl <span style='color:#111;'> 0B </span>","children":null,"spread":false}],"spread":false},{"title":"0.tmpl <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"subdir","children":[{"title":"1.tmpl <span style='color:#111;'> 0B </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"partials","children":[{"title":"content-partial.tmpl <span style='color:#111;'> 55B </span>","children":null,"spread":false},{"title":"content.tmpl <span style='color:#111;'> 96B </span>","children":null,"spread":false},{"title":"layout.tmpl <span style='color:#111;'> 61B </span>","children":null,"spread":false}],"spread":false},{"title":"basic","children":[{"title":"another_layout.tmpl <span style='color:#111;'> 38B </span>","children":null,"spread":false},{"title":"admin","children":[{"title":"index.tmpl <span style='color:#111;'> 21B </span>","children":null,"spread":false}],"spread":false},{"title":"content.tmpl <span style='color:#111;'> 17B </span>","children":null,"spread":false},{"title":"layout.tmpl <span style='color:#111;'> 22B </span>","children":null,"spread":false},{"title":"current_layout.tmpl <span style='color:#111;'> 50B </span>","children":null,"spread":false},{"title":"hello.tmpl <span style='color:#111;'> 21B </span>","children":null,"spread":false},{"title":"delims.tmpl <span style='color:#111;'> 22B </span>","children":null,"spread":false},{"title":"hypertext.html <span style='color:#111;'> 11B </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"engine_integration_test.go <span style='color:#111;'> 1.41KB </span>","children":null,"spread":false},{"title":"render.go <span style='color:#111;'> 13.39KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明