小编Edw*_*nto的帖子

从范围中获取索引号

在 php 中获取索引号:

foreach much as index => each{
 //get index number from index
}
Run Code Online (Sandbox Code Playgroud)

如何在 go 中获取索引号?

{{ range .post }}
   {{ // how can i get index number? }}
   {{ .Id }}
   {{ .Name}}
{{ end}}
Run Code Online (Sandbox Code Playgroud)

html templates loops go go-templates

5
推荐指数
1
解决办法
1735
查看次数

标签 统计

go ×1

go-templates ×1

html ×1

loops ×1

templates ×1