package views type ReportViewModel struct { Total string PlatformFees string Fee string Profit string Lines []*ReportLine } type ReportLine struct { Id string Url templ.SafeURL Total string CustomerName string From string To string Platform string PlatformFees string Fee string Profit string } templ ReportSection(report *ReportViewModel) {

Your report

for _, row := range report.Lines { }
ID Name From To Total (€) Platform Platform Fees (€) Fees (€) Profit (€)
{ row.Id } { row.CustomerName } { row.From } { row.To } { row.Total } { row.Platform } { row.PlatformFees } { row.Fee } { row.Profit }
{ report.Total } { report.PlatformFees } { report.Fee } { report.Profit }
}