renderHTML generates html using the named template based on the contents of data.
(dst io.Writer, tmpl string, rpt *report.Report, errList, legend []string, data webArgs)
| 283 | |
| 284 | // renderHTML generates html using the named template based on the contents of data. |
| 285 | func renderHTML(dst io.Writer, tmpl string, rpt *report.Report, errList, legend []string, data webArgs) error { |
| 286 | file := getFromLegend(legend, "File: ", "unknown") |
| 287 | profile := getFromLegend(legend, "Type: ", "unknown") |
| 288 | data.Title = file + " " + profile |
| 289 | data.Errors = errList |
| 290 | data.Total = rpt.Total() |
| 291 | data.DocURL = rpt.DocURL() |
| 292 | data.Legend = legend |
| 293 | return getHTMLTemplates().ExecuteTemplate(dst, tmpl, data) |
| 294 | } |
| 295 | |
| 296 | // render responds with html generated by passing data to the named template. |
| 297 | func (ui *webInterface) render(w http.ResponseWriter, req *http.Request, tmpl string, |
no test coverage detected
searching dependent graphs…