i use the go template
it work:
{{range $k, $name := .userList}}
<tr>
<a href="/?id={{$k}}">{{call .Tr "hey"}}</a>
</tr>
{{end}}
it not work: get the err : at <.Tr>: can't evaluate field Tr in type string
{{range $k, $name := .userList}}
<tr>
<a href="/?id={{$k}}">{{call .Tr $name}}</a>
</tr>
{{end}}
i want use $name for the Tr func , how can i do ?