I am trying to create an HTML template that includes a table. Each row in the table should represent a struct I have and include values from that struct.
The only relevant reference I found is this: golang template - how to render templates?
The difference is that I don't know in advance the number of rows in the table, so I need to be able to loop through a dyanmic list of structs I have, and for each such struct populate its values into a template representing a row and add that row to the parent template representing the table.
Can anyone show me how this can be done? Any other approach is also welcome.