我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

“块”型模板功能

Using http/template is it possible to define a "block"-type function that work like the built-in define or range? For example, I'd like to make a function that works like:

<div class="page">
  {{doThing}}
    Large amount of text here...
  {{end}}
</div>

I know I can make it work with {{ doThing "Large amount of text here..." }}, but that's not quite what I want.

It is not possible to write a block-type function that works like the built-in define or range actions.

近期文章

  • Go Oracle命令在CGO中失败
  • GO:数组/切片为常规字符串
  • Go日志结构实例化实用程序的Goroutine线程安全性
  • c#labelview如何显示DataSet的数据
  • 最快的NoSQL通配符搜索DBMS?
  • 如何使用插入顺序Go中的键生成YAML?
  • 带有Golang的Postgresql,问题
  • go + elastigo紧急:运行时错误:索引超出范围
  • 使用事务时Golang Postgres驱动程序出现紧急情况
  • golang cgo无法通过构建模式c共享导出变量
  • 编写openshift扩展
  • CGo:运行时意外信号
  • 解组转义的JSON字符串[重复]
  • golang http文件过多
  • Docker的Golang连续工作流程
  • mplayer无法从golang获取stdin流
  • 如何使用主机从Google App Engine应用程序连接到Compute Engine上的Postgresql数据库
  • 尝试从模型创建表时出错
  • 如何二进制读取Opus文件
  • Beego验证接受无效数据

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华