1
Good afternoon to all!
I need a help, I have two structs that are in the controller package as below:
type ListValidation struct{
Id int
Nameplan string
Escop string
Data string
}
type ListTests struct{
Id int
TestName string
TestsSteps string
DataNow string
}
The values of these two structs are filled and then passed to another struct that is in the package "Routes":
validation, tests := controller.ExecutValidationPage(id)
type DadosRecebidos struct{
DadosStructValidation controller.ListValidation
DadosStructTests controller.ListTests
}
dadosStruct := DadosRecebidos{}
dadosStruct.DadosStructValidation = validation
dadosStruct.DadosStructTests = tests
tmplt.ExecuteTemplate(w, "execvalidation", dadosStruct)
As the above code I am passing the data to my html template, however I do not know how to display the data in the html tags, when I use a nonnested struct I just need to declare {{. Nameplan}} between the tags that the value is passed, but with this kind of nested struct I don’t know how. They could give me a help?.