feat: custom template
This commit is contained in:
@@ -9,9 +9,6 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
//go:embed assets/template.html
|
||||
var htmlTemplate string
|
||||
|
||||
//go:embed assets/style.css
|
||||
var style template.CSS
|
||||
|
||||
@@ -33,7 +30,7 @@ func (r Report) ToHTML() (html string, err error) {
|
||||
"time": fmtDateTime,
|
||||
"date": fmtDate,
|
||||
"duration": fmtDuration,
|
||||
}).Parse(htmlTemplate))
|
||||
}).Parse(r.template))
|
||||
|
||||
buf := new(bytes.Buffer)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user