【发布时间】:2016-10-18 01:30:32
【问题描述】:
所以我可以在模板文件中使用{{.Host}},但一旦进入{{range .Items}} 循环它就不起作用,因为它试图从.Items(数组?)事物中获取.Host。 .
我认为这是一个错误
template: listing:41:46: executing "listing" at <.Host>: can't evaluate field Host in type browse.FileInfo
我以前从未使用过 Go,我曾尝试阅读 text template documentation 页面,但这一切都相当混乱。
【问题讨论】:
标签: go go-templates caddy