







I’m unmarshalling a CSV file and iterating over the contents. The fragment of code looks like: {{ $data := dict }} {{ with $file := .datafile }} {{ with resources.Get (printf "people/writing/%s" $file) }} {{ $opts := dict "targetType" "map" }} {{ $data = transform.Unmarshal $opts . }} {{ end }} {{ range $data }} <p>Title = {{ index . "title" }}</p> <p>Author = {{ index . "author" }}</p> {{ end }} {{ end }} and the input data looks something like: title,author ...
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。