mirror of
https://github.com/securego/gosec.git
synced 2024-12-26 04:25:52 +00:00
18 lines
332 B
Go
18 lines
332 B
Go
|
package html
|
||
|
|
||
|
import (
|
||
|
"github.com/securego/gosec/v2/report/core"
|
||
|
"html/template"
|
||
|
"io"
|
||
|
)
|
||
|
|
||
|
//WriteReport write a report in html format to the output writer
|
||
|
func WriteReport(w io.Writer, data *core.ReportInfo) error {
|
||
|
t, e := template.New("gosec").Parse(templateContent)
|
||
|
if e != nil {
|
||
|
return e
|
||
|
}
|
||
|
|
||
|
return t.Execute(w, data)
|
||
|
}
|