I have a struct, containing two slices with same size, which is to be passed to the template.
type V struct {
Process []string
ProcessType []string
}
I need to iterate the slices in same range. In golang(without a framework) we could do this as follows
//I know all of you know this. Added for better understanding of my problem.
{{range $i, $e := .Process}}
{{.}}
{{index $.ProcessType $i}}
{{end}}
We could apply range on a slice in beego like this
{{range $key, $val := .vm.Process}} //this.Data["vm"] = V (Struct V is passed as vm to the template)
{{$val}}
{{end}}
How to include slice ProcessType in this range too?