标签: go
例如
{{ range $k, $v := .rec}} {{ $k }} :: {{ $v }} {{ end }}
抓取错误panic: template: let:2:19: executing "let" at <.rec>: can't evaluate field rec in type []string。
panic: template: let:2:19: executing "let" at <.rec>: can't evaluate field rec in type []string
答案 0 :(得分:-1)
{{ range $k, $v := .}} {{ $k }} :: {{ $v }} {{ end }}