I have a data structure that is sometihng like:
map[string]SomeStructure
I have another struct that encapsulates the above plus additional variables and other structs and that's what gets sent to the template:
type page struct {
Status map[string]SomeStructure
Database []string
}
In my template file I want to be able to do something like
{{ range index .Database}}
{{ .Status "KEY".MemberVariableOfSomeStructure }}
{{ end }}
Except I want the "KEY" to be dynamic based on the iterating .Database value.