renderPage retrieves the given template and renders it to the given io.Writer. If something goes wrong, the error is logged and returned.
(w io.Writer, tmpl string, data interface{})
| 180 | // renderPage retrieves the given template and renders it to the given io.Writer. |
| 181 | // If something goes wrong, the error is logged and returned. |
| 182 | func renderPage(w io.Writer, tmpl string, data interface{}) error { |
| 183 | err := pages[tmpl].ExecuteTemplate(w, "base", data) |
| 184 | if err != nil { |
| 185 | log.Error("%v", err) |
| 186 | } |
| 187 | return err |
| 188 | } |
| 189 | |
| 190 | func largeNumFmt(n int64) string { |
| 191 | return humanize.Comma(n) |
no outgoing calls
no test coverage detected