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

如何通过模板动态访问变量?

I'm using hugo as a static site generator, and need to do something like this:

$.Site.Data.pages[{{ .Params.location }}].someStuff

I am not sure of the syntax to actually accomplish this and it's such an irritatingly simple thing that it's actually difficult to find by googling

近期文章

  • Golang在生产中崩溃
  • 去SMTP发送电子邮件
  • 从GoMobile调用JS捆绑包?
  • Rethinkdb根据归约数据对组数据进行排序
  • 较旧的服务传输较新版本的协议缓冲区3消息
  • 在Go中使用smtp发送Gmail
  • 将我的go函数输出暴露给Qml
  • GO:使用管道执行命令[重复]
  • Golang:json.Decode / Unmarshal之后分析器中有很多堆项
  • 使用Golang获取mysql连接时出错
  • 如何根据mgo中的条件结果进行分组
  • 我应该在范围之前进行RLock映射吗?
  • runc容器启动golang分离模式
  • OSX 10.7.5(Lion)支持什么版本的Go
  • func(* UDPConn)ReadMsgUDP中的oob是什么?
  • AWS CloudTrail Create API for Go SDK引发错误消息“ InsufficientS3BucketPolicyException:为存储桶检测到错误的S3存储桶策略”
  • 在不同位置提供静态文件
  • 提供终端输入到`gexec.Session`
  • Go的runtime.ReadMemStats报告的统计信息是否应该大约等于ps aux报告的常驻内存集?
  • 从Go发送带有“名称” <email>的电子邮件

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

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

友情链接:代码精华